file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCanBeAssigned.ts
TypeScript
enum E { a, b } var a: any; var b: void; var x1: any; x1 += a; x1 += b; x1 += true; x1 += 0; x1 += ''; x1 += E.a; x1 += {}; x1 += null; x1 += undefined; var x2: string; x2 += a; x2 += b; x2 += true; x2 += 0; x2 += ''; x2 += E.a; x2 += {}; x2 += null; x2 += undefined; var x3: number; x3 += a; x3 += 0; x3 += E.a; x3 += null; x3 += undefined; var x4: E; x4 += a; x4 += 0; x4 += E.a; x4 += null; x4 += undefined; var x5: boolean; x5 += a; var x6: {}; x6 += a; x6 += ''; var x7: void; x7 += a;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCannotBeAssigned.ts
TypeScript
// string can add every type, and result string cannot be assigned to below types enum E { a, b, c } var x1: boolean; x1 += ''; var x2: number; x2 += ''; var x3: E; x3 += ''; var x4: {a: string}; x4 += ''; var x5: void; x5 += '';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentWithInvalidOperands.ts
TypeScript
enum E { a, b } var a: void; var x1: boolean; x1 += a; x1 += true; x1 += 0; x1 += E.a; x1 += {}; x1 += null; x1 += undefined; var x2: {}; x2 += a; x2 += true; x2 += 0; x2 += E.a; x2 += {}; x2 += null; x2 += undefined; var x3: void; x3 += a; x3 += true; x3 += 0; x3 += E.a; x3 += {}; x3 += null; x3 += undefined; var x4: number; x4 += a; x4 += true; x4 += {}; var x5: E; x5 += a; x5 += true; x5 += {};
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.ts
TypeScript
var value; // identifiers: variable and parameter var x1: number; x1 *= value; x1 += value; function fn1(x2: number) { x2 *= value; x2 += value; } // property accesses var x3: { a: number }; x3.a *= value; x3.a += value; x3['a'] *= value; x3['a'] += value; // parentheses, the contained expression is reference (x1) *= value; (x1) += value; function fn2(x4: number) { (x4) *= value; (x4) += value; } (x3.a) *= value; (x3.a) += value; (x3['a']) *= value; (x3['a']) += value;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.ts
TypeScript
var value: any; // identifiers: variable and parameter var x1: number; x1 **= value; function fn1(x2: number) { x2 **= value; } // property accesses var x3: { a: number }; x3.a **= value; x3['a'] **= value; // parentheses, the contained expression is reference (x1) **= value; function fn2(x4: number) { (x4) **= value; } (x3.a) **= value; (x3['a']) **= value;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames10_ES5.ts
TypeScript
// @target: es5 var s: string; var n: number; var a: any; var v = { [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [<any>true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames10_ES6.ts
TypeScript
// @target: es6 var s: string; var n: number; var a: any; var v = { [s]() { }, [n]() { }, [s + s]() { }, [s + n]() { }, [+s]() { }, [""]() { }, [0]() { }, [a]() { }, [<any>true]() { }, [`hello bye`]() { }, [`hello ${a} bye`]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames11_ES5.ts
TypeScript
// @target: es5 var s: string; var n: number; var a: any; var v = { get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [<any>true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames11_ES6.ts
TypeScript
// @target: es6 var s: string; var n: number; var a: any; var v = { get [s]() { return 0; }, set [n](v) { }, get [s + s]() { return 0; }, set [s + n](v) { }, get [+s]() { return 0; }, set [""](v) { }, get [0]() { return 0; }, set [a](v) { }, get [<any>true]() { return 0; }, set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames13_ES5.ts
TypeScript
// @target: es5 var s: string; var n: number; var a: any; class C { [s]() {} [n]() { } static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } [0]() { } [a]() { } static [<any>true]() { } [`hello bye`]() { } static [`hello ${a} bye`]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames13_ES6.ts
TypeScript
// @target: es6 var s: string; var n: number; var a: any; class C { [s]() {} [n]() { } static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } [0]() { } [a]() { } static [<any>true]() { } [`hello bye`]() { } static [`hello ${a} bye`]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames14_ES5.ts
TypeScript
// @target: es5 var b: boolean; class C { [b]() {} static [true]() { } [[]]() { } static [{}]() { } [undefined]() { } static [null]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames14_ES6.ts
TypeScript
// @target: es6 var b: boolean; class C { [b]() {} static [true]() { } [[]]() { } static [{}]() { } [undefined]() { } static [null]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames15_ES5.ts
TypeScript
// @target: es5 var p1: number | string; var p2: number | number[]; var p3: string | boolean; class C { [p1]() { } [p2]() { } [p3]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames15_ES6.ts
TypeScript
// @target: es6 var p1: number | string; var p2: number | number[]; var p3: string | boolean; class C { [p1]() { } [p2]() { } [p3]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames16_ES5.ts
TypeScript
// @target: es5 var s: string; var n: number; var a: any; class C { get [s]() { return 0;} set [n](v) { } static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } get [0]() { return 0; } set [a](v) { } static get [<any>true]() { return 0; } set [`hello bye`](v) { } get [`hello ${a} bye`]() { return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames16_ES6.ts
TypeScript
// @target: es6 var s: string; var n: number; var a: any; class C { get [s]() { return 0;} set [n](v) { } static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } get [0]() { return 0; } set [a](v) { } static get [<any>true]() { return 0; } set [`hello bye`](v) { } get [`hello ${a} bye`]() { return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames17_ES5.ts
TypeScript
// @target: es5 var b: boolean; class C { get [b]() { return 0;} static set [true](v) { } get [[]]() { return 0; } set [{}](v) { } static get [undefined]() { return 0; } set [null](v) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames17_ES6.ts
TypeScript
// @target: es6 var b: boolean; class C { get [b]() { return 0;} static set [true](v) { } get [[]]() { return 0; } set [{}](v) { } static get [undefined]() { return 0; } set [null](v) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames18_ES5.ts
TypeScript
// @target: es5 function foo() { var obj = { [this.bar]: 0 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames18_ES6.ts
TypeScript
// @target: es6 function foo() { var obj = { [this.bar]: 0 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames19_ES5.ts
TypeScript
// @target: es5 module M { var obj = { [this.bar]: 0 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames19_ES6.ts
TypeScript
// @target: es6 module M { var obj = { [this.bar]: 0 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES5.ts
TypeScript
// @target: es5 var v = { get [0 + 1]() { return 0 }, set [0 + 1](v: string) { } //No error }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames1_ES6.ts
TypeScript
// @target: es6 var v = { get [0 + 1]() { return 0 }, set [0 + 1](v: string) { } //No error }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames20_ES5.ts
TypeScript
// @target: es5 var obj = { [this.bar]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames20_ES6.ts
TypeScript
// @target: es6 var obj = { [this.bar]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames21_ES5.ts
TypeScript
// @target: es5 class C { bar() { return 0; } [this.bar()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames21_ES6.ts
TypeScript
// @target: es6 class C { bar() { return 0; } [this.bar()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames22_ES5.ts
TypeScript
// @target: es5 class C { bar() { var obj = { [this.bar()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames22_ES6.ts
TypeScript
// @target: es6 class C { bar() { var obj = { [this.bar()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames23_ES5.ts
TypeScript
// @target: es5 class C { bar() { return 0; } [ { [this.bar()]: 1 }[0] ]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames23_ES6.ts
TypeScript
// @target: es6 class C { bar() { return 0; } [ { [this.bar()]: 1 }[0] ]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames24_ES5.ts
TypeScript
// @target: es5 class Base { bar() { return 0; } } class C extends Base { [super.bar()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames24_ES6.ts
TypeScript
// @target: es6 class Base { bar() { return 0; } } class C extends Base { // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. [super.bar()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames25_ES5.ts
TypeScript
// @target: es5 class Base { bar() { return 0; } } class C extends Base { foo() { var obj = { [super.bar()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames25_ES6.ts
TypeScript
// @target: es6 class Base { bar() { return 0; } } class C extends Base { foo() { var obj = { [super.bar()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames26_ES5.ts
TypeScript
// @target: es5 class Base { bar() { return 0; } } class C extends Base { [ { [super.bar()]: 1 }[0] ]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames26_ES6.ts
TypeScript
// @target: es6 class Base { bar() { return 0; } } class C extends Base { // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. [ { [super.bar()]: 1 }[0] ]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames27_ES5.ts
TypeScript
// @target: es5 class Base { } class C extends Base { [(super(), "prop")]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames27_ES6.ts
TypeScript
// @target: es6 class Base { } class C extends Base { [(super(), "prop")]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames28_ES5.ts
TypeScript
// @target: es5 class Base { } class C extends Base { constructor() { super(); var obj = { [(super(), "prop")]() { } }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames28_ES6.ts
TypeScript
// @target: es6 class Base { } class C extends Base { constructor() { super(); var obj = { [(super(), "prop")]() { } }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames29_ES5.ts
TypeScript
// @target: es5 class C { bar() { () => { var obj = { [this.bar()]() { } // needs capture }; } return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames29_ES6.ts
TypeScript
// @target: es6 class C { bar() { () => { var obj = { [this.bar()]() { } // needs capture }; } return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames2_ES5.ts
TypeScript
// @target: es5 var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } static [methodName]() { } get [accessorName]() { } set [accessorName](v) { } static get [accessorName]() { } static set [accessorName](v) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames2_ES6.ts
TypeScript
// @target: es6 var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } static [methodName]() { } get [accessorName]() { } set [accessorName](v) { } static get [accessorName]() { } static set [accessorName](v) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames30_ES5.ts
TypeScript
// @target: es5 class Base { } class C extends Base { constructor() { super(); () => { var obj = { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. [(super(), "prop")]() { } }; } } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames30_ES6.ts
TypeScript
// @target: es6 class Base { } class C extends Base { constructor() { super(); () => { var obj = { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. [(super(), "prop")]() { } }; } } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames31_ES5.ts
TypeScript
// @target: es5 class Base { bar() { return 0; } } class C extends Base { foo() { () => { var obj = { [super.bar()]() { } // needs capture }; } return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames31_ES6.ts
TypeScript
// @target: es6 class Base { bar() { return 0; } } class C extends Base { foo() { () => { var obj = { [super.bar()]() { } // needs capture }; } return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES5.ts
TypeScript
// @target: es5 function foo<T>() { return '' } class C<T> { bar() { return 0; } [foo<T>()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES6.ts
TypeScript
// @target: es6 function foo<T>() { return '' } class C<T> { bar() { return 0; } [foo<T>()]() { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES5.ts
TypeScript
// @target: es5 function foo<T>() { return '' } class C<T> { bar() { var obj = { [foo<T>()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES6.ts
TypeScript
// @target: es6 function foo<T>() { return '' } class C<T> { bar() { var obj = { [foo<T>()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES5.ts
TypeScript
// @target: es5 function foo<T>() { return '' } class C<T> { static bar() { var obj = { [foo<T>()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES6.ts
TypeScript
// @target: es6 function foo<T>() { return '' } class C<T> { static bar() { var obj = { [foo<T>()]() { } }; return 0; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames36_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: number]: Foo2; // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames37_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: number]: Foo2; // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties get [1 << 6]() { return new Foo } set [1 << 6](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames38_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties get [1 << 6]() { return new Foo } set [1 << 6](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: number]: Foo2; // Computed properties get [1 << 6]() { return new Foo } set [1 << 6](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames39_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: number]: Foo2; // Computed properties get [1 << 6]() { return new Foo } set [1 << 6](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames40_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: () => Foo2; // Computed properties [""]() { return new Foo } [""]() { return new Foo2 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames40_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: () => Foo2; // Computed properties [""]() { return new Foo } [""]() { return new Foo2 } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames41_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: () => Foo2; // Computed properties static [""]() { return new Foo } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames41_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: () => Foo2; // Computed properties static [""]() { return new Foo } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames42_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties [""]: Foo; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames42_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; // Computed properties [""]: Foo; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; } class D extends C { // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames43_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; } class D extends C { // Computed properties get ["get1"]() { return new Foo } set ["set1"](p: Foo2) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; get ["get1"]() { return new Foo } } class D extends C { set ["set1"](p: Foo) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames44_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { [s: string]: Foo2; get ["get1"]() { return new Foo } } class D extends C { set ["set1"](p: Foo) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES5.ts
TypeScript
// @target: es5 class Foo { x } class Foo2 { x; y } class C { get ["get1"]() { return new Foo } } class D extends C { // No error when the indexer is in a class more derived than the computed property [s: string]: Foo2; set ["set1"](p: Foo) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames45_ES6.ts
TypeScript
// @target: es6 class Foo { x } class Foo2 { x; y } class C { get ["get1"]() { return new Foo } } class D extends C { // No error when the indexer is in a class more derived than the computed property [s: string]: Foo2; set ["set1"](p: Foo) { } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames46_ES5.ts
TypeScript
// @target: es5 var o = { ["" || 0]: 0 };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames46_ES6.ts
TypeScript
// @target: es6 var o = { ["" || 0]: 0 };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames47_ES5.ts
TypeScript
// @target: es5 enum E1 { x } enum E2 { x } var o = { [E1.x || E2.x]: 0 };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames47_ES6.ts
TypeScript
// @target: es6 enum E1 { x } enum E2 { x } var o = { [E1.x || E2.x]: 0 };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.ts
TypeScript
// @target: es5 declare function extractIndexer<T>(p: { [n: number]: T }): T; enum E { x } var a: any; extractIndexer({ [a]: "" }); // Should return string extractIndexer({ [E.x]: "" }); // Should return string extractIndexer({ ["" || 0]: "" }); // Should return any (widened form of undefined)
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.ts
TypeScript
// @target: es6 declare function extractIndexer<T>(p: { [n: number]: T }): T; enum E { x } var a: any; extractIndexer({ [a]: "" }); // Should return string extractIndexer({ [E.x]: "" }); // Should return string extractIndexer({ ["" || 0]: "" }); // Should return any (widened form of undefined)
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames4_ES5.ts
TypeScript
// @target: es5 var s: string; var n: number; var a: any; var v = { [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [<any>true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames4_ES6.ts
TypeScript
// @target: es6 var s: string; var n: number; var a: any; var v = { [s]: 0, [n]: n, [s + s]: 1, [s + n]: 2, [+s]: s, [""]: 0, [0]: 0, [a]: 1, [<any>true]: 0, [`hello bye`]: 0, [`hello ${a} bye`]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES5.ts
TypeScript
function f<T, K extends keyof T>() { var t: T; var k: K; var v = { [t]: 0, [k]: 1 }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES6.ts
TypeScript
// @target: es6 function f<T, K extends keyof T>() { var t: T; var k: K; var v = { [t]: 0, [k]: 1 }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames5_ES5.ts
TypeScript
// @target: es5 var b: boolean; var v = { [b]: 0, [true]: 1, [[]]: 0, [{}]: 0, [undefined]: undefined, [null]: null }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames5_ES6.ts
TypeScript
// @target: es6 var b: boolean; var v = { [b]: 0, [true]: 1, [[]]: 0, [{}]: 0, [undefined]: undefined, [null]: null }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames6_ES5.ts
TypeScript
// @target: es5 var p1: number | string; var p2: number | number[]; var p3: string | boolean; var v = { [p1]: 0, [p2]: 1, [p3]: 2 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames6_ES6.ts
TypeScript
// @target: es6 var p1: number | string; var p2: number | number[]; var p3: string | boolean; var v = { [p1]: 0, [p2]: 1, [p3]: 2 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames7_ES5.ts
TypeScript
// @target: es5 enum E { member } var v = { [E.member]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames7_ES6.ts
TypeScript
// @target: es6 enum E { member } var v = { [E.member]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES5.ts
TypeScript
// @target: es5 function f<T, U extends string>() { var t: T; var u: U; var v = { [t]: 0, [u]: 1 }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES6.ts
TypeScript
// @target: es6 function f<T, U extends string>() { var t: T; var u: U; var v = { [t]: 0, [u]: 1 }; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.ts
TypeScript
// @target: es5 function f(s: string): string; function f(n: number): number; function f<T>(x: T): T; function f(x): any { } var v = { [f("")]: 0, [f(0)]: 0, [f(true)]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.ts
TypeScript
// @target: es6 function f(s: string): string; function f(n: number): number; function f<T>(x: T): T; function f(x): any { } var v = { [f("")]: 0, [f(0)]: 0, [f(true)]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType10_ES5.ts
TypeScript
// @target: es5 interface I { [s: number]: boolean; } var o: I = { [+"foo"]: "", [+"bar"]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType10_ES6.ts
TypeScript
// @target: es6 interface I { [s: number]: boolean; } var o: I = { [+"foo"]: "", [+"bar"]: 0 }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType1_ES5.ts
TypeScript
// @target: es5 interface I { [s: string]: (x: string) => number; [s: number]: (x: any) => number; // Doesn't get hit } var o: I = { ["" + 0](y) { return y.length; }, ["" + 1]: y => y.length }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University