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/directReferenceToNull.ts
TypeScript
var x: Null;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/directReferenceToUndefined.ts
TypeScript
var x: Undefined; var y = undefined;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.ts
TypeScript
// @strict: true // Repro from #28862 type Foo<A> = { type: "foo", (): A[] }; type Bar<A> = { type: "bar", (): A }; type FooBar<A> = Foo<A> | Bar<A>; type InferA<T> = T extends FooBar<infer A> ? A : never; type FooA = InferA<Foo<number>>; // number // Repro from #28862 type Item<T> = { kind: 'a', data: T } | { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.ts
TypeScript
interface Square { kind: "square"; size: number; } interface Rectangle { kind: "rectangle"; width: number; height: number; } interface Circle { kind: "circle"; radius: number; } type Shape = Square | Rectangle | Circle; function area1(s: Shape) { if (s.kind === "square") { re...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.ts
TypeScript
// @strict: true function f10(x : { kind: false, a: string } | { kind: true, b: string } | { kind: string, c: string }) { if (x.kind === false) { x.a; } else if (x.kind === true) { x.b; } else { x.c; } } function f11(x : { kind: false, a: string } | { kind: true, b: str...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes3.ts
TypeScript
// @strict: true // Repro from #44435 type Correct = { code: string property: true err: undefined } type Err = { err: `${string} is wrong!` } type SomeReturnType = Correct | Err; const example: SomeReturnType = {} as SomeReturnType; if (example.err === undefined) { example.property; // true }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/doWhileBreakStatements.ts
TypeScript
// @allowUnusedLabels: true // @allowUnreachableCode: true do { break; } while(true) ONE: do { break ONE; } while (true) TWO: THREE: do { break THREE; }while (true) FOUR: do { FIVE: do { break FOUR; }while (true) }while (true) do { SIX: do break SIX; while(true) }while (true...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/doWhileContinueStatements.ts
TypeScript
// @allowUnreachableCode: true do { continue; } while(true) ONE: do { continue ONE; } while (true) TWO: THREE: do { continue THREE; }while (true) FOUR: do { FIVE: do { continue FOUR; }while (true) }while (true) do { SIX: do continue SIX; while(true) }while (true) SEVEN: do ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/duplicateExportAssignments.ts
TypeScript
// @Filename: foo1.ts var x = 10; var y = 20; export = x; export = y; // @Filename: foo2.ts var x = 10; class y {}; export = x; export = y; // @Filename: foo3.ts module x { export var x = 10; } class y { y: number; } export = x; export = y; // @Filename: foo4.ts export = x; function x(){ return 42; } function y()...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/duplicateNumericIndexers.ts
TypeScript
// @skipDefaultLibCheck: false // it is an error to have duplicate index signatures of the same kind in a type interface Number { [x: number]: string; [x: number]: string; } interface String { [x: number]: string; [x: number]: string; } interface Array<T> { [x: number]: T; [x: number]: T; } ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions01.ts
TypeScript
// @declaration: true let x = <{a: number; a: number}>{};
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions02.ts
TypeScript
// @declaration: true let x = {} as {a: number; a: number};
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/duplicateStringIndexers.ts
TypeScript
// it is an error to have duplicate index signatures of the same kind in a type module test { interface Number { [x: string]: string; [x: string]: string; } interface String { [x: string]: string; [x: string]: string; } interface Array<T> { [x: string]: T; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/elementAccessChain.2.ts
TypeScript
// @strict: false declare const o1: undefined | { b: string }; o1?.["b"]; declare const o2: undefined | { b: { c: string } }; o2?.["b"].c; o2?.b["c"]; declare const o3: { b: undefined | { c: string } }; o3["b"]?.c; o3.b?.["c"];
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/elementAccessChain.3.ts
TypeScript
// @strict: true declare const obj: any; obj?.["a"]++; obj?.a["b"]++; obj?.["a"]--; obj?.a["b"]--; ++obj?.["a"]; ++obj?.a["b"]; --obj?.["a"]; --obj?.a["b"]; obj?.["a"] = 1; obj?.a["b"] = 1; obj?.["a"] += 1; obj?.a["b"] += 1; for (obj?.["a"] in {}); for (obj?.a["b"] in {}); for (obj?.["a"] of []); for (obj?.a["b"] ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/elementAccessChain.ts
TypeScript
// @strict: true declare const o1: undefined | { b: string }; o1?.["b"]; declare const o2: undefined | { b: { c: string } }; o2?.["b"].c; o2?.b["c"]; declare const o3: { b: undefined | { c: string } }; o3["b"]?.c; o3.b?.["c"]; declare const o4: { b?: { c: { d?: { e: string } } } }; o4.b?.["c"].d?.e; o4.b?.["c"].d?....
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunction.ts
TypeScript
// @target:es5 var f1 = () => { } var f2 = (x: string, y: string) => { } var f3 = (x: string, y: number, ...rest) => { } var f4 = (x: string, y: number, z = 10) => { } function foo(func: () => boolean) { } foo(() => true); foo(() => { return false; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionAsIs.ts
TypeScript
// @target:ES5 var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionAsIsES6.ts
TypeScript
// @target:ES6 var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.ts
TypeScript
// @target:es6 var f1 = () => { } var f2 = (x: string, y: string) => { } var f3 = (x: string, y: number, ...rest) => { } var f4 = (x: string, y: number, z=10) => { } function foo(func: () => boolean) { } foo(() => true); foo(() => { return false; }); // Binding patterns in arrow functions var p1 = ([a]) => { }; var p...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturing.ts
TypeScript
// @target:es5 var f1 = () => { this.age = 10 }; var f2 = (x: string) => { this.name = x } function foo(func: () => boolean) { } foo(() => { this.age = 100; return true; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionThisCapturingES6.ts
TypeScript
// @target:es6 var f1 = () => { this.age = 10 }; var f2 = (x: string) => { this.name = x } function foo(func: () => boolean){ } foo(() => { this.age = 100; return true; });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01.ts
TypeScript
// @target: es5 var a = () => { var arg = arguments[0]; // error } var b = function () { var a = () => { var arg = arguments[0]; // error } } function baz() { () => { var arg = arguments[0]; } } function foo(inputFunc: () => void) { } foo(() => { var arg = arguments[0]; // error }); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments01_ES6.ts
TypeScript
// @target: es6 var a = () => { var arg = arguments[0]; // error } var b = function () { var a = () => { var arg = arguments[0]; // error } } function baz() { () => { var arg = arguments[0]; } } function foo(inputFunc: () => void) { } foo(() => { var arg = arguments[0]; // error }); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments02.ts
TypeScript
// @target: es5 var a = () => arguments;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments02_ES6.ts
TypeScript
// @target: es6 var a = () => arguments;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments03.ts
TypeScript
// @target: es5 var arguments; var a = () => arguments;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments03_ES6.ts
TypeScript
// @target: es6 var arguments; var a = () => arguments;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments04.ts
TypeScript
// @target: es5 function f() { var arguments; var a = () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments04_ES6.ts
TypeScript
// @target: es6 function f() { var arguments; var a = () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments05.ts
TypeScript
// @target: es5 function f(arguments) { var a = () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments05_ES6.ts
TypeScript
// @target: es6 function f(arguments) { var a = () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments06.ts
TypeScript
// @target: es5 function f(arguments) { var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments06_ES6.ts
TypeScript
// @target: es6 function f(arguments) { var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments07.ts
TypeScript
// @target: es5 function f(arguments) { var a = (arguments) => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments07_ES6.ts
TypeScript
// @target: es6 function f(arguments) { var a = (arguments) => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments08.ts
TypeScript
// @target: es5 function f(arguments) { var a = () => (arguments) => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments08_ES6.ts
TypeScript
// @target: es6 function f(arguments) { var a = () => (arguments) => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments09.ts
TypeScript
// @target: es5 function f(_arguments) { var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments09_ES6.ts
TypeScript
// @target: es6 function f(_arguments) { var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments10.ts
TypeScript
// @target: es5 function f() { var _arguments = 10; var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments10_ES6.ts
TypeScript
// @target: es6 function f() { var _arguments = 10; var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments11.ts
TypeScript
// @target: es5 function f(arguments) { var _arguments = 10; var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments11_ES6.ts
TypeScript
// @target: es6 function f(arguments) { var _arguments = 10; var a = () => () => arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments13.ts
TypeScript
// @target: es5 function f() { var _arguments = 10; var a = (arguments) => () => _arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments13_ES6.ts
TypeScript
// @target: es6 function f() { var _arguments = 10; var a = (arguments) => () => _arguments; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments14.ts
TypeScript
// @target: es5 function f() { if (Math.random()) { const arguments = 100; return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments14_ES6.ts
TypeScript
// @target: es6 function f() { if (Math.random()) { let arguments = 100; return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments15.ts
TypeScript
// @target: es5 function f() { var arguments = "hello"; if (Math.random()) { const arguments = 100; return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments15_ES6.ts
TypeScript
// @target: es6 function f() { var arguments = "hello"; if (Math.random()) { const arguments = 100; return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments16.ts
TypeScript
// @target: es5 function f() { var arguments = "hello"; if (Math.random()) { return () => arguments[0]; } var arguments = "world"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments16_ES6.ts
TypeScript
// @target: es6 function f() { var arguments = "hello"; if (Math.random()) { return () => arguments[0]; } var arguments = "world"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments17.ts
TypeScript
// @target: es5 function f() { var { arguments } = { arguments: "hello" }; if (Math.random()) { return () => arguments[0]; } var arguments = "world"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments17_ES6.ts
TypeScript
// @target: es6 function f() { var { arguments } = { arguments: "hello" }; if (Math.random()) { return () => arguments[0]; } var arguments = "world"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments18.ts
TypeScript
// @target: es5 function f() { var { arguments: args } = { arguments }; if (Math.random()) { return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments18_ES6.ts
TypeScript
// @target: es6 function f() { var { arguments: args } = { arguments }; if (Math.random()) { return () => arguments; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19.ts
TypeScript
// @target: es5 function f() { function g() { var _arguments = 10; // No capture in 'g', so no conflict. function h() { var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h' foo(_arguments); // Error as thi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionWhenUsingArguments19_ES6.ts
TypeScript
// @target: es6 function f() { function g() { var _arguments = 10; // No capture in 'g', so no conflict. function h() { var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h' foo(_arguments); // Error as thi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionsAsIs.ts
TypeScript
// @target:ES5 var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitArrowFunctionsAsIsES6.ts
TypeScript
// @target:ES6 var arrow1 = a => { }; var arrow2 = (a) => { }; var arrow3 = (a, b) => { };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.ts
TypeScript
// @target: es6 class C { constructor(y: any) constructor(x: number) { } } class D { constructor(y: any) constructor(x: number, z="hello") {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.ts
TypeScript
// @target: es6 class A { y: number; constructor(x: number) { } foo(a: any); foo() { } } class B { y: number; x: string = "hello"; _bar: string; constructor(x: number, z = "hello", ...args) { this.y = 10; } baz(...args): string; baz(z: string, v: number): strin...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.ts
TypeScript
// @target: es6 class B<T> { constructor(a: T) { } } class C extends B<string> { } class D extends B<number> { constructor(a: any) constructor(b: number) { super(b); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.ts
TypeScript
// @target: es6 class B { baz(a: string, y = 10) { } } class C extends B { foo() { } baz(a: string, y:number) { super.baz(a, y); } } class D extends C { constructor() { super(); } foo() { super.foo(); } baz() { super.baz("hello", 10); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithGetterSetterInES6.ts
TypeScript
// @target:es6 class C { _name: string; get name(): string { return this._name; } static get name2(): string { return "BYE"; } static get ["computedname"]() { return ""; } get ["computedname1"]() { return ""; } get ["computedname2"]() { re...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithLiteralPropertyNameInES6.ts
TypeScript
// @target: es6 class B { "hello" = 10; 0b110 = "world"; 0o23534 = "WORLD"; 20 = "twenty"; "foo"() { } 0b1110() {} 11() { } interface() { } static "hi" = 10000; static 22 = "twenty-two"; static 0b101 = "binary"; static 0o3235 = "octal"; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithMethodInES6.ts
TypeScript
// @target:es6 class D { _bar: string; foo() { } ["computedName1"]() { } ["computedName2"](a: string) { } ["computedName3"](a: string): number { return 1; } bar(): string { return this._bar; } baz(a: any, x: string): string { return "HELLO"; } static ["computedn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithPropertyAccessInHeritageClause1.ts
TypeScript
class B {} function foo() { return {B: B}; } class C extends (foo()).B {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithPropertyAssignmentInES6.ts
TypeScript
// @target:es6 class C { x: string = "Hello world"; } class D { x: string = "Hello world"; y: number; constructor() { this.y = 10; } } class E extends D{ z: boolean = true; } class F extends D{ z: boolean = true; j: string; constructor() { super(); this.j ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithStaticPropertyAssignmentInES6.ts
TypeScript
// @target:es6 class C { static z: string = "Foo"; } class D { x = 20000; static b = true; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithSuperMethodCall01.ts
TypeScript
//@target: es6 class Parent { foo() { } } class Foo extends Parent { foo() { var x = () => super.foo(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithThisKeywordInES6.ts
TypeScript
// @target: es6 class B { x = 10; constructor() { this.x = 10; } static log(a: number) { } foo() { B.log(this.x); } get X() { return this.x; } set bX(y: number) { this.x = y; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts
TypeScript
// @target: es6 class B<T> { x: T; B: T; constructor(a: any) constructor(a: any,b: T) constructor(a: T) { this.B = a;} foo(a: T) foo(a: any) foo(b: string) foo(): T { return this.x; } get BB(): T { return this.B; } set BBWith(c: T) { this.B...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.ts
TypeScript
// @target: es6 class B<T> { x: T; B: T; constructor(a: T) { this.B = a;} foo(): T { return this.x; } get BB(): T { return this.B; } set BBWith(c: T) { this.B = c; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts
TypeScript
// @target: es5 var array0 = [1, 2, 3] var i0 = 0; array0[++i0] **= 2; var array1 = [1, 2, 3] var i1 = 0; array1[++i1] **= array1[++i1] **= 2; var array2 = [1, 2, 3] var i2 = 0; array2[++i2] **= array2[++i2] ** 2; var array3 = [2, 2, 3]; var j0 = 0, j1 = 1; array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts
TypeScript
// @target: es5 var globalCounter = 0; function foo() { globalCounter += 1; return { 0: 2 }; } foo()[0] **= foo()[0]; var result_foo1 = foo()[0] **= foo()[0]; foo()[0] **= foo()[0] **= 2; var result_foo2 = foo()[0] **= foo()[0] **= 2; foo()[0] **= foo()[0] ** 2; var result_foo3 = foo()[0] **= foo()[0] ** 2;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts
TypeScript
// @target: es5 var object = { _0: 2, get 0() { return this._0; }, set 0(x: number) { this._0 = x; }, } object[0] **= object[0]; object[0] **= object[0] **= 2; object[0] **= object[0] ** 2;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts
TypeScript
// @target: es5 var globalCounter = 0; function incrementIdx(max: number) { globalCounter += 1; let idx = Math.floor(Math.random() * max); return idx; } var array1 = [1, 2, 3, 4, 5]; array1[incrementIdx(array1.length)] **= 3; array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] *...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts
TypeScript
// @target: es5 var globalCounter = 0; function foo() { globalCounter += 1; return { prop: 2 }; } foo().prop **= 2; var result0 = foo().prop **= 2; foo().prop **= foo().prop **= 2; var result1 = foo().prop **= foo().prop **= 2; foo().prop **= foo().prop ** 2; var result2 = foo().prop **= foo().prop ** 2;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationOperator1.ts
TypeScript
// @target:es5 var comp: number; comp **= 1; comp **= comp ** comp; comp **= comp ** comp ** 2; comp **= comp ** comp + 2; comp **= comp ** comp - 2; comp **= comp ** comp * 2; comp **= comp ** comp / 2; comp **= comp ** comp % 2; comp **= (comp - 2) ** 5; comp **= (comp + 2) ** 5; comp **= (comp * 2) ** 5; comp **=...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitCompoundExponentiationOperator2.ts
TypeScript
// @target:es5 var comp: number; comp **= 1; comp **= comp **= 1; comp **= comp **= 1 + 2; comp **= comp **= 1 - 2; comp **= comp **= 1 * 2; comp **= comp **= 1 / 2; comp **= comp **= (1 + 2); comp **= comp **= (1 - 2); comp **= comp **= (1 * 2); comp **= comp **= (1 / 2); comp **= comp **= 1 + 2 ** 3; comp **= co...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.ts
TypeScript
// @target: es5 function foo(x: string, y = 10) { } function baz(x: string, y = 5, ...rest) { } function bar(y = 10) { } function bar1(y = 10, ...rest) { }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.ts
TypeScript
// @target:es6 function foo(x: string, y = 10) { } function baz(x: string, y = 5, ...rest) { } function bar(y = 10) { } function bar1(y = 10, ...rest) { }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.ts
TypeScript
// @target: es5 var lambda1 = (y = "hello") => { } var lambda2 = (x: number, y = "hello") => { } var lambda3 = (x: number, y = "hello", ...rest) => { } var lambda4 = (y = "hello", ...rest) => { } var x = function (str = "hello", ...rest) { } var y = (function (num = 10, boo = false, ...rest) { })() var z = (function ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.ts
TypeScript
// @target:es6 var lambda1 = (y = "hello") => { } var lambda2 = (x: number, y = "hello") => { } var lambda3 = (x: number, y = "hello", ...rest) => { } var lambda4 = (y = "hello", ...rest) => { } var x = function (str = "hello", ...rest) { } var y = (function (num = 10, boo = false, ...rest) { })() var z = (function (...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.ts
TypeScript
// @target: es5 var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, func3(x: string, z: number, y = "hello") { }, func4(x: string, z: number, y = "hello", ...rest) { }, }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.ts
TypeScript
// @target:es6 var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, func3(x: string, z: number, y = "hello") { }, func4(x: string, z: number, y = "hello", ...rest) { }, }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.ts
TypeScript
// @target: es5 class C { constructor(t: boolean, z: string, x: number, y = "hello") { } public foo(x: string, t = false) { } public foo1(x: string, t = false, ...rest) { } public bar(t = false) { } public boo(t = false, ...rest) { } } class D { constructor(y = "hello") { } } class E { c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.ts
TypeScript
// @target:es6 class C { constructor(t: boolean, z: string, x: number, y = "hello") { } public foo(x: string, t = false) { } public foo1(x: string, t = false, ...rest) { } public bar(t = false) { } public boo(t = false, ...rest) { } } class D { constructor(y = "hello") { } } class E { co...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperator1.ts
TypeScript
// @target: es5 1 ** -2; 1 ** 2; (-1) ** 2 1 ** 2 ** 3; 1 ** 2 ** -3; 1 ** -(2 ** 3); (-(1 ** 2)) ** 3; (-(1 ** 2)) ** -3; 1 ** 2 + 3; 1 ** 2 - 3; 1 ** 2 * 3; 1 ** 2 / 3; 1 ** 2 % 3; 1 ** -2 + 3; 1 ** -2 - 3; 1 ** -2 * 3; 1 ** -2 / 3; 1 ** -2 % 3; 2 + 3 ** 3; 2 - 3 ** 3; 2 * 3 ** 3; 2 / 3 ** 3; 2 % 3 ** 3; (2 + 3...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperator2.ts
TypeScript
// @target:es5 var temp = 10; ++temp ** 3; --temp ** 3; temp++ ** 3; temp-- ** 3; --temp + temp ** 3; --temp - temp ** 3; --temp * temp ** 3; --temp / temp ** 3; --temp % temp ** 3; temp-- ** 3; temp++ ** 3; temp-- ** -temp; temp++ ** +temp; temp-- + temp ** 3; temp-- - temp ** 3; temp-- * temp ** 3; temp-- / temp ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperator3.ts
TypeScript
// @target:es5 var temp = 10; (-++temp) ** 3; (+--temp) ** 3; (-temp++) ** 3; (+temp--) ** 3; (-(1 ** ++temp)) ** 3; (-(1 ** --temp)) ** 3; (-(1 ** temp++)) ** 3; (-(1 ** temp--)) ** 3; (-3) ** temp++; (-3) ** temp--; (-3) ** ++temp; (-3) ** --temp; (+3) ** temp++; (+3) ** temp--; (+3) ** ++temp; (+3) ** --temp; (-...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperator4.ts
TypeScript
// @target: es5 var temp: any; (<number>temp) ** 3; (<number>--temp) ** 3; (<number>++temp) ** 3; (<number>temp--) ** 3; (<number>temp++) ** 3; 1 ** (<number>--temp) ** 3; 1 ** (<number>++temp) ** 3; 1 ** (<number>temp--) ** 3; 1 ** (<number>temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; (void 3) ** 4; (void...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTempalteString4.ts
TypeScript
// @target: es5 var t1 = 10; var t2 = 10; var s; // With TemplateTail `${t1 ** -t2} world`; `${(-t1) ** t2 - t1} world`; `${(-++t1) ** t2 - t1} world`; `${(-t1++) ** t2 - t1} world`; `${(~t1) ** t2 ** --t1 } world`; `${typeof (t1 ** t2 ** t1) } world`; // TempateHead & TemplateTail are empt `${t1 ** -t2} hello worl...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTempalteString4ES6.ts
TypeScript
// @target: es6 var t1 = 10; var t2 = 10; var s; // With TemplateTail `${t1 ** -t2} world`; `${(-t1) ** t2 - t1} world`; `${(-++t1) ** t2 - t1} world`; `${(-t1++) ** t2 - t1} world`; `${(~t1) ** t2 ** --t1 } world`; `${typeof (t1 ** t2 ** t1) } world`; // TempateHead & TemplateTail are empt `${t1 ** -t2} hello worl...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTemplateString1.ts
TypeScript
// @target: es5 var t1 = 10; var t2 = 10; var s; // TempateHead & TemplateTail are empty `${t1 ** t2}`; `${t1 ** t2 ** t1}`; `${t1 + t2 ** t1}`; `${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1 }`; `${typeof (t1 ** t2 ** t1) }`; `${1 + typeof (t1 ** t2 ** t1) }`; `${t1 ** t2}${t1 ** t2}`; `${t1 ** t2 ** t1}${t1 ** t2 ** t...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTemplateString1ES6.ts
TypeScript
// @target: es6 var t1 = 10; var t2 = 10; var s; // TempateHead & TemplateTail are empty `${t1 ** t2}`; `${t1 ** t2 ** t1}`; `${t1 + t2 ** t1}`; `${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1 }`; `${typeof (t1 ** t2 ** t1) }`; `${1 + typeof (t1 ** t2 ** t1) }`; `${t1 ** t2}${t1 ** t2}`; `${t1 ** t2 ** t1}${t1 ** t2 ** t...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTemplateString2.ts
TypeScript
// @target: es5 var t1 = 10; var t2 = 10; var s; // With templateHead `hello ${t1 ** t2}`; `hello ${t1 ** t2 ** t1}`; `hello ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1 }`; `hello ${typeof (t1 ** t2 ** t1) }`; `hello ${1 + typeof (t1 ** t2 ** t1) }`; `hello ${t1 ** t2}${t1 ** t2}`; `hel...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTemplateString2ES6.ts
TypeScript
// @target: es6 var t1 = 10; var t2 = 10; var s; // With templateHead `hello ${t1 ** t2}`; `hello ${t1 ** t2 ** t1}`; `hello ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1 }`; `hello ${typeof (t1 ** t2 ** t1) }`; `hello ${1 + typeof (t1 ** t2 ** t1) }`; `hello ${t1 ** t2}${t1 ** t2}`; `hel...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_parser/tests/tsc/emitExponentiationOperatorInTemplateString3.ts
TypeScript
// @target: es5 var t1 = 10; var t2 = 10; var s; // With TemplateTail `${t1 ** t2} world`; `${t1 ** t2 ** t1} world`; `${t1 + t2 ** t1} world`; `${t1 ** t2 + t1} world`; `${t1 + t2 ** t2 + t1 } world`; `${typeof (t1 ** t2 ** t1) } world`; `${1 + typeof (t1 ** t2 ** t1) } world`; `${t1 ** t2}${t1 ** t2} world`; `${t...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University