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/span/ts/expr/arrow.ts | TypeScript | const a: () => any = () => {
return 'foo'
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/expr/as.ts | TypeScript | 'WTF' as any as number | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/expr/const-assertion.ts | TypeScript | 'FOO' as const | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/expr/type-args.ts | TypeScript | foo<string, boolean>(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/issue-8856/param.ts | TypeScript | function b(a: number = 1) { }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/issue-8856/var-decl.ts | TypeScript | const a: number
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/stmt/try-catch-unknown.ts | TypeScript | try {
} catch (e: unknown) {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/alias.ts | TypeScript | type Test = "test" ;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/array.ts | TypeScript | let a: string[] = foo | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/cond.ts | TypeScript | type F<A> = A extends {} ? B : C; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/constructor-type.ts | TypeScript | type A = new () => void; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/enum.ts | TypeScript | enum Enum {
A,
B = 1,
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/fn.ts | TypeScript | type A = () => void; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/import.ts | TypeScript | type A = import('foo').Bar | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/interface.ts | TypeScript | interface Foo {
new();
(foo: string): void;
[foo: string]: void;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/intersection.ts | TypeScript | type A = { foo: string } & { bar: boolean } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/tuple.ts | TypeScript | type A = [any, string, boolean] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/span/ts/type/tuple/optional.ts | TypeScript | type Foo = [first: number, second?: string, ...rest: any[]];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/test262.rs | Rust | #![feature(test)]
extern crate test;
use std::{
env,
fs::{read_dir, File},
io::{self, Read},
path::Path,
};
use common::Normalizer;
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, PResult, Parser, Syntax};
use swc_ecma_visit::FoldWith;
use test::{
test_main, DynTestFn, Options, ShouldPan... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.ts | TypeScript | // @target: ES5
/* *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
Licens... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts | TypeScript | // @filename: module.d.ts
declare module Point {
export var Origin: { x: number; y: number; }
}
// @filename: function.d.ts
declare function Point(): { x: number; y: number; }
// @filename: test.ts
var cl: { x: number; y: number; }
var cl = Point();
var cl = Point.Origin; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts | TypeScript | // @filename: module.d.ts
declare module A {
export module Point {
export var Origin: {
x: number;
y: number;
}
}
}
// @filename: class.d.ts
declare module A {
export class Point {
constructor(x: number, y: number);
x: number;
y: number;
}... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts | TypeScript | // @filename: module.d.ts
declare module A {
export module Point {
export var Origin: {
x: number;
y: number;
}
}
}
// @filename: classPoint.ts
module A {
export class Point {
constructor(public x: number, public y: number) { }
}
}
// @filename: test.ts
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts | TypeScript | // @filename: module.d.ts
declare module Point {
export var Origin: { x: number; y: number; }
}
// @filename: function.ts
function Point() {
return { x: 0, y: 0 };
}
// @filename: test.ts
var cl: { x: number; y: number; }
var cl = Point();
var cl = Point.Origin; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ArrowFunction4.ts | TypeScript | var v = (a, b) => {
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts | TypeScript | // all expected to be errors
class clodule1<T>{
id: string;
value: T;
}
module clodule1 {
function f(x: T) { }
}
class clodule2<T>{
id: string;
value: T;
}
module clodule2 {
var x: T;
class D<U extends T>{
id: string;
value: U;
}
}
class clodule3<T>{
id: stri... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts | TypeScript | class clodule<T> {
id: string;
value: T;
static fn<U>(id: U) { }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): T {
return x;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts | TypeScript | class clodule<T> {
id: string;
value: T;
static fn(id: string) { }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): T {
return x;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts | TypeScript | class clodule<T> {
id: string;
value: T;
private static sfn(id: string) { return 42; }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): number {
return clodule.sfn('a');
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts | TypeScript | class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
}
module Point {
export function Origin() { return null; } //expected duplicate identifier error
}
module A {
export class Point {
construct... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts | TypeScript | class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; }
}
module Point {
function Origin() { return ""; }// not an error, since not exported
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts | TypeScript | class Point {
constructor(public x: number, public y: number) { }
static Origin: Point = { x: 0, y: 0 };
}
module Point {
export var Origin = ""; //expected duplicate identifier error
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts | TypeScript | class Point {
constructor(public x: number, public y: number) { }
static Origin: Point = { x: 0, y: 0 };
}
module Point {
var Origin = ""; // not an error, since not exported
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin: Point =... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts | TypeScript | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | ||
crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.ts | TypeScript | // @filename: class.ts
module X.Y {
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
x: number;
y: number;
}
}
// @filename: module.ts
module X.Y {
export module Point {
export var Origin = new Point(0, 0);
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.ts | TypeScript | // @target: ES6
// @filename: class.ts
module X.Y {
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
x: number;
y: number;
}
}
// @filename: module.ts
module X.Y {
export module Point {
export var Origin = new... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck1.ts | TypeScript | //@target: ES5
for (var v of "") { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck2.ts | TypeScript | //@target: ES5
for (var v of [true]) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck4.ts | TypeScript | //@target: ES5
var union: string | string[];
for (const v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES3For-ofTypeCheck6.ts | TypeScript | //@target: ES5
var union: string[] | number[];
for (var v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of1.ts | TypeScript | //@sourcemap: true
for (var v of ['a', 'b', 'c']) {
console.log(v);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of10.ts | TypeScript | function foo() {
return { x: 0 };
}
for (foo().x of []) {
for (foo().x of [])
var p = foo().x;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of11.ts | TypeScript | var v;
for (v of []) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of12.ts | TypeScript | for ([""] of [[""]]) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of13.ts | TypeScript | //@sourcemap: true
for (let v of ['a', 'b', 'c']) {
var x = v;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of14.ts | TypeScript | for (const v of []) {
var x = v;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of15.ts | TypeScript | for (let v of []) {
v;
for (const v of []) {
var x = v;
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of16.ts | TypeScript | for (let v of []) {
v;
for (let v of []) {
var x = v;
v++;
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of17.ts | TypeScript | for (let v of []) {
v;
for (let v of [v]) {
var x = v;
v++;
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of18.ts | TypeScript | for (let v of []) {
v;
}
for (let v of []) {
v;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of19.ts | TypeScript | for (let v of []) {
v;
function foo() {
for (const v of []) {
v;
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of2.ts | TypeScript | for (var v of []) {
var x = v;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of21.ts | TypeScript | for (let v of []) {
for (let _i of []) { }
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of22.ts | TypeScript | for (var x of [1, 2, 3]) {
let _a = 0;
console.log(x);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of23.ts | TypeScript | for (var x of [1, 2, 3]) {
var _a = 0;
console.log(x);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of24.ts | TypeScript | var a = [1, 2, 3];
for (var v of a) {
let a = 0;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of25.ts | TypeScript | //@sourcemap: true
var a = [1, 2, 3];
for (var v of a) {
v;
a;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of26.ts | TypeScript | //@sourcemap: true
for (var [a = 0, b = 1] of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of27.ts | TypeScript | for (var {x: a = 0, y: b = 1} of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of28.ts | TypeScript | for (let [a = 0, b = 1] of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of29.ts | TypeScript | for (const {x: a = 0, y: b = 1} of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of3.ts | TypeScript | //@sourcemap: true
for (var v of ['a', 'b', 'c'])
var x = v; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of30.ts | TypeScript | var a: string, b: number;
var tuple: [number, string] = [2, "3"];
for ([a = 1, b = ""] of tuple) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of31.ts | TypeScript | var a: string, b: number;
for ({ a: b = 1, b: a = ""} of []) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of33.ts | TypeScript | //@sourcemap: true
//@downlevelIteration: true
for (var v of ['a', 'b', 'c']) {
console.log(v);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of34.ts | TypeScript | //@sourcemap: true
//@downlevelIteration: true
function foo() {
return { x: 0 };
}
for (foo().x of ['a', 'b', 'c']) {
var p = foo().x;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of35.ts | TypeScript | //@sourcemap: true
//@downlevelIteration: true
for (const {x: a = 0, y: b = 1} of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of36.ts | TypeScript | //@sourcemap: true
//@downlevelIteration: true
for (let [a = 0, b = 1] of [2, 3]) {
a;
b;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of37.ts | TypeScript | // @downlevelIteration: true
// https://github.com/microsoft/TypeScript/issues/30083
for (const i of [0, 1, 2, 3, 4]) {
try {
// Ensure catch binding for the following loop is reset per iteration:
for (const j of [1, 2, 3]) {
if (i === 2) {
throw new Error('ERR');
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of4.ts | TypeScript | for (var v of [])
var x = v;
var y = v; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of5.ts | TypeScript | for (var _a of []) {
var x = _a;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of6.ts | TypeScript | for (var w of []) {
for (var v of []) {
var x = [w, v];
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of7.ts | TypeScript | for (var w of []) {
var x = w;
}
for (var v of []) {
var x = [w, v];
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of8.ts | TypeScript | //@sourcemap: true
function foo() {
return { x: 0 };
}
for (foo().x of ['a', 'b', 'c']) {
var p = foo().x;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-of9.ts | TypeScript | function foo() {
return { x: 0 };
}
for (foo().x of []) {
for (foo().x of []) {
var p = foo().x;
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck1.ts | TypeScript | //@target: ES5
for (var v of "") { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck10.ts | TypeScript | //@target: ES5
// In ES3/5, you cannot for...of over an arbitrary iterable.
class StringIterator {
next() {
return {
done: true,
value: ""
};
}
[Symbol.iterator]() {
return this;
}
}
for (var v of new StringIterator) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck11.ts | TypeScript | //@target: ES5
var union: string | number[];
var v: string;
for (v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck12.ts | TypeScript | //@target: ES5
for (const v of 0) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck13.ts | TypeScript | //@target: ES5
//@lib: ES6
const strSet: Set<string> = new Set()
strSet.add('Hello')
strSet.add('World')
for (const str of strSet) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck14.ts | TypeScript | //@target: ES5
//@lib: ES6
var union: string | Set<number>
for (const e of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck2.ts | TypeScript | //@target: ES5
for (var v of [true]) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck3.ts | TypeScript | //@target: ES5
var tuple: [string, number] = ["", 0];
for (var v of tuple) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck4.ts | TypeScript | //@target: ES5
var union: string | string[];
for (const v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck5.ts | TypeScript | //@target: ES5
var union: string | number[];
for (var v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck6.ts | TypeScript | //@target: ES5
var union: string[] | number[];
for (var v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck7.ts | TypeScript | //@target: ES5
var union: string | number;
for (var v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck8.ts | TypeScript | //@target: ES5
var union: string | string[]| number[]| symbol[];
var v: symbol;
for (v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5For-ofTypeCheck9.ts | TypeScript | //@target: ES5
var union: string | string[] | number | symbol;
for (let v of union) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty1.ts | TypeScript | //@target: ES5
interface SymbolConstructor {
foo: string;
}
var Symbol: SymbolConstructor;
var obj = {
[Symbol.foo]: 0
}
obj[Symbol.foo]; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty2.ts | TypeScript | //@target: ES5
module M {
var Symbol: any;
export class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator];
}
(new M.C)[Symbol.iterator]; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty3.ts | TypeScript | //@target: ES5
var Symbol: any;
class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty4.ts | TypeScript | //@target: ES5
var Symbol: { iterator: string };
class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty5.ts | TypeScript | //@target: ES5
var Symbol: { iterator: symbol };
class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator](0) // Should error | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty6.ts | TypeScript | //@target: ES5
class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty7.ts | TypeScript | //@target: ES5
var Symbol: { iterator: any };
class C {
[Symbol.iterator]() { }
}
(new C)[Symbol.iterator] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5SymbolType1.ts | TypeScript | //@target: ES5
var s: symbol;
s.toString(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ES5for-of32.ts | TypeScript | //@target: ES5
var array = [1,2,3];
var sum = 0;
for (let num of array) {
if (sum === 0) {
array = [4,5,6]
}
sum += num;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.ts | TypeScript | enum enumdule {
Red, Blue
}
module enumdule {
export class Point {
constructor(public x: number, public y: number) { }
}
}
var x: enumdule;
var x = enumdule.Red;
var y: { x: number; y: number };
var y = new enumdule.Point(0, 0); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts | TypeScript | module A {
interface Point {
x: number;
y: number;
fromOrigin(p: Point): number;
}
export class Point2d implements Point {
constructor(public x: number, public y: number) { }
fromOrigin(p: Point) {
return 1;
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.