Skip to content

Commit d7ae9dc

Browse files
committed
Merge branch 'source' into feature/benchmark-visualizer
# Conflicts: # package-lock.json # package.json
2 parents 99e724f + b921432 commit d7ae9dc

7 files changed

Lines changed: 2381 additions & 2619 deletions

File tree

docs/advanced/compiler-annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Denotes a type is a Lua iterator. When an object of a type with this annotation
218218
/** @luaIterator */
219219
type LuaIterable<T> = Iterable<T>;
220220

221-
declare function myIterator(): LuaIterator<string>;
221+
declare function myIterator(): LuaIterable<string>;
222222
for (const s of myIterator()) {}
223223
```
224224

docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = {
2222
theme: require("prism-react-renderer/themes/github"),
2323
darkTheme: require("prism-react-renderer/themes/vsDark"),
2424
},
25+
algolia: {
26+
apiKey: "c0cf59beed38709e9ed6b0ac80b24ee5",
27+
indexName: "typescripttolua",
28+
},
2529
},
2630
presets: [
2731
[

package-lock.json

Lines changed: 2359 additions & 2601 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,35 @@
1414
"dependencies": {
1515
"@types/d3": "^5.7.2",
1616
"@types/lz-string": "^1.3.34",
17-
"@types/react": "^16.9.34",
18-
"@types/react-dom": "^16.9.6",
17+
"@types/react": "^16.9.35",
18+
"@types/react-dom": "^16.9.8",
1919
"@types/react-json-tree": "^0.6.11",
20-
"@types/webpack-env": "^1.15.1",
21-
"clsx": "^1.1.0",
2220
"d3": "^5.16.0",
21+
"@types/webpack-env": "^1.15.2",
22+
"clsx": "^1.1.1",
2323
"fengari-web": "^0.1.4",
24-
"lua-types": "^2.7.0",
24+
"lua-types": "^2.8.0",
2525
"lz-string": "^1.4.4",
2626
"monaco-editor": "^0.20.0",
2727
"react": "^16.13.1",
2828
"react-dom": "^16.13.1",
2929
"react-json-tree": "^0.11.2",
3030
"react-monaco-editor": "^0.36.0",
31-
"typescript-to-lua": "^0.32.2"
31+
"typescript-to-lua": "^0.34.0"
3232
},
3333
"devDependencies": {
3434
"@ark120202/typescript-config": "^2.1.0",
35-
"@docusaurus/core": "^2.0.0-alpha.50",
36-
"@docusaurus/preset-classic": "^2.0.0-alpha.50",
37-
"@types/node": "^13.11.1",
35+
"@docusaurus/core": "^2.0.0-alpha.56",
36+
"@docusaurus/preset-classic": "^2.0.0-alpha.56",
37+
"@types/node": "^14.0.11",
3838
"file-loader": "^6.0.0",
39-
"fork-ts-checker-webpack-plugin": "^4.1.3",
39+
"fork-ts-checker-webpack-plugin": "^4.1.6",
4040
"null-loader": "^4.0.0",
41-
"prettier": "^2.0.4",
41+
"prettier": "^2.0.5",
4242
"raw-loader": "^4.0.1",
43-
"sass": "^1.26.3",
43+
"sass": "^1.26.8",
4444
"sass-loader": "^8.0.2",
45-
"typescript": "^3.8.3",
45+
"typescript": "^3.9.5",
4646
"worker-loader": "^2.0.0"
4747
},
4848
"browserslist": [

src/pages/play/code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function getInitialCode() {
2929

3030
if (window.location.hash.startsWith("#code/")) {
3131
const code = window.location.hash.replace("#code/", "").trim();
32-
return lzstring.decompressFromEncodedURIComponent(code) ?? "";
32+
return lzstring.decompressFromEncodedURIComponent(code) || "";
3333
}
3434

3535
return example;

src/pages/play/ts.worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const libContext = require.context(`raw-loader!typescript-to-lua/dist/lualib`, t
1111
const emitHost: tstl.EmitHost = {
1212
getCurrentDirectory: () => "",
1313
readFile: (fileName: string) => {
14-
const [, featureName] = fileName.match(/\/dist\/lualib\/(.+)\.lua$/) ?? [];
14+
const [, featureName] = fileName.match(/\/dist\/lualib\/(.+)\.lua$/) || [];
1515
if (featureName === undefined) {
1616
throw new Error(`Unexpected file to read: ${fileName}`);
1717
}

src/theme/CodeBlock/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ export default ({ children, className: languageClassName, metastring = "" }) =>
7272
const { showCopied, handleCopyCode, target, button } = useClipboard();
7373

7474
const code = children.trim();
75-
const [, title] = metastring.match(/title=(.+)( |$)/) ?? [];
75+
const [, title] = metastring.match(/title=(.+)( |$)/) || [];
7676

77-
const [, highlightLinesRange] = metastring.match(/{([\d,-]+)}/) ?? [];
77+
const [, highlightLinesRange] = metastring.match(/{([\d,-]+)}/) || [];
7878
const highlightLines =
7979
highlightLinesRange != null ? rangeParser.parse(highlightLinesRange).filter((n) => n > 0) : [];
8080

0 commit comments

Comments
 (0)