mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
--- old.plainJSGrammarErrors.js
|
|
+++ new.plainJSGrammarErrors.js
|
|
@@= skipped -229, +229 lines =@@
|
|
return null;
|
|
}
|
|
// modifier mistakes
|
|
- constructor() { }
|
|
- constructor() { }
|
|
+ static constructor() { }
|
|
+ async constructor() { }
|
|
x = 1;
|
|
y() {
|
|
return 12;
|
|
@@= skipped -37, +37 lines =@@
|
|
export static var staticExport = 1;
|
|
function staticParam(static x = 1) { return x; }
|
|
async export function oorder(x = 1) { return x; }
|
|
-function cantExportParam(export x = 1) { return x; }
|
|
+function cantExportParam(x = 1) { return x; }
|
|
function cantAsyncParam(async x = 1) { return x; }
|
|
async async function extremelyAsync() { }
|
|
async class CantAsyncClass {
|
|
@@= skipped -8, +8 lines =@@
|
|
}
|
|
async const cantAsyncConst = 2;
|
|
async import 'assert';
|
|
-export { CantAsyncClass };
|
|
+async export { CantAsyncClass };
|
|
export import 'fs';
|
|
export { C };
|
|
function nestedExports() {
|
|
@@= skipped -36, +36 lines =@@
|
|
var a = [1, 2];
|
|
a `length`;
|
|
const o = {
|
|
- [console.log('oh no'), 2]: 'hi',
|
|
+ [(console.log('oh no'), 2)]: 'hi',
|
|
#noPrivate: 3,
|
|
cantExportProperties: 4,
|
|
// TODO: See what the existing JS error is like for these
|