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_transforms_base/tests/ts-resolver/issues/1517/2/input.ts | TypeScript | type Y = {
get bar(): string;
set bar(v: string | number);
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1517/2/output.ts | TypeScript | type Y__2 = {
get bar__0(): string;
set bar__0(v: string | number);
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1653/1/input.ts | TypeScript | namespace X {
export namespace Z {
export const foo = 0;
}
}
namespace Y {
export namespace Z {
export const bar = 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1653/1/output.ts | TypeScript | namespace X__2 {
export namespace Z__3 {
export const foo__4 = 0;
}
}
namespace Y__2 {
export namespace Z__5 {
export const bar__6 = 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1653/2/input.ts | TypeScript | namespace X {
export namespace Z {
export const foo = 0;
}
}
namespace Y {
export namespace Z {
export const bar = 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1653/2/output.ts | TypeScript | namespace X__2 {
export namespace Z__3 {
export const foo__4 = 0;
}
}
namespace Y__2 {
export namespace Z__5 {
export const bar__6 = 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1869/case1/input.ts | TypeScript | const ZQLExport: IZQL = class ZQL {
private static requiredMap = {
[ZQLAction.QUERY]: ["tableName"],
[ZQLAction.SUM]: ["tableName", "fields", "sumBy"],
[ZQLAction.COUNT]: ["tableName"],
[ZQLAction.GET_API]: ["api", "output"],
[ZQLAction.SEARCH]: ["keyword"],
};
private static zqlQueryTemplate: (
...values: any[]
) => string = ZQL.zqlTemplateParser`query ${"fnName"}${"fnName?.("}${"tableName"}${"fields?.."}${"fields"}${"fnName?.)"} ${"condition?.where"} ${"condition"} ${"restrictBy"} ${"returnWith"} ${"groupBy"} ${"orderBy"} ${"orderDirection"} ${"limit"} ${"offset"} ${"namedAs"}`;
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/1869/case1/output.ts | TypeScript | const ZQLExport__2: IZQL = class ZQL__3 {
private static requiredMap = {
[ZQLAction.QUERY]: [
"tableName"
],
[ZQLAction.SUM]: [
"tableName",
"fields",
"sumBy"
],
[ZQLAction.COUNT]: [
"tableName"
],
[ZQLAction.GET_API]: [
"api",
"output"
],
[ZQLAction.SEARCH]: [
"keyword"
]
};
private static zqlQueryTemplate: (...values: any[]) => string = ZQL__3.zqlTemplateParser`query ${"fnName"}${"fnName?.("}${"tableName"}${"fields?.."}${"fields"}${"fnName?.)"} ${"condition?.where"} ${"condition"} ${"restrictBy"} ${"returnWith"} ${"groupBy"} ${"orderBy"} ${"orderDirection"} ${"limit"} ${"offset"} ${"namedAs"}`;
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/2021/1/input.ts | TypeScript | class Item extends Component {
constructor(props) {
super(props);
}
input = this.props.item;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/2021/1/output.ts | TypeScript | class Item__2 extends Component {
constructor(props__3){
super(props__3);
}
input = this.props.item;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/2627/1/input.ts | TypeScript | {
let a = 1;
const b = 1;
var c = 1;
}
console.log(a);
console.log(b);
console.log(c);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/2627/1/output.ts | TypeScript | {
let a__3 = 1;
const b__3 = 1;
var c__2 = 1;
}console.log(a);
console.log(b);
console.log(c__2);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/3960/1/input.ts | TypeScript | import { field } from "../validation/decorators";
class C {
constructor(
@field("a") readonly field: string,
@field("b") readonly b: string
) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/3960/1/output.ts | TypeScript | import { field__2 } from "../validation/decorators";
class C__2 {
constructor(
@field__2("a")
readonly field__3: string,
@field__2("b")
readonly b__3: string){}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/3960/2/input.ts | TypeScript | import { field } from "../validation/decorators";
class C {
method(
@field("a") readonly field: string,
@field("b") readonly b: string
) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/3960/2/output.ts | TypeScript | import { field__2 } from "../validation/decorators";
class C__2 {
method(
@field__2("a")
field__3: string,
@field__2("b")
b__3: string) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/6533/input.ts | TypeScript | import * as F from "foo";
import type { Thing } from "anywhere";
console.log(F)
export const inner = <F>(a: F) => {
console.log(F)
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/6533/output.ts | TypeScript | import * as F__2 from "foo";
import type { Thing__2 } from "anywhere";
console.log(F__2);
export const inner__2 = <F__3>(a__3: F__3)=>{
console.log(F__2);
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/let_scoping/input.ts | TypeScript | function wrapper() {
const usage = () => {
return a;
};
let a;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/let_scoping/output.ts | TypeScript | function wrapper__2() {
const usage__3 = ()=>{
return a__3;
};
let a__3;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/minifier/1/input.ts | TypeScript | function foo() {
try {
foo();
} catch (ex) {
let x = 10;
const y = 10;
class Zee {}
}
console.log(x, y, Zee);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/minifier/1/output.ts | TypeScript | function foo__2() {
try {
foo__2();
} catch (ex__5) {
let x__5 = 10;
const y__5 = 10;
class Zee__5 {
}
}
console.log(x, y, Zee);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/namepsace/hoisting/1/input.ts | TypeScript | declare namespace RangeParser {
interface Ranges extends Array<Range> {
type: string;
}
interface Range {
start: number;
end: number;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/namepsace/hoisting/1/output.ts | TypeScript | declare namespace RangeParser__2 {
interface Ranges__3 extends Array<Range__3> {
type__0: string;
}
interface Range__3 {
start__0: number;
end__0: number;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/param/input.ts | TypeScript | function Test1({
var1 = new Set<number>(),
var2 = "123", // <- this variable is renamed to `var21`
var3 = "456",
}) {
console.log(var1, var2, var3); // <- here `var2` is used
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/param/output.ts | TypeScript | function Test1__2({ var1__3 = new Set<number>(), var2__3 = "123", var3__3 = "456" }) {
console.log(var1__3, var2__3, var3__3);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/simple/003/input.ts | TypeScript | class Foo<T> {}
class A {}
class B {}
new Foo<A>();
new Foo<B>();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/simple/003/output.ts | TypeScript | class Foo__2<T__3> {
}
class A__2 {
}
class B__2 {
}
new Foo__2<A__2>();
new Foo__2<B__2>();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/1/input.ts | TypeScript | // @target: esnext
// @declaration: true
interface Mixin1 {
mixinMethod(): void;
}
abstract class AbstractBase {
abstract abstractBaseMethod(): void;
}
function Mixin2<TBase extends abstract new (...args: any[]) => any>(baseClass: TBase) {
// must be `abstract` because we cannot know *all* of the possible abstract members that need to be
// implemented for this to be concrete.
abstract class MixinClass extends baseClass implements Mixin1 {
mixinMethod(): void {}
static staticMixinMethod(): void {}
}
return MixinClass;
}
class DerivedFromAbstract2 extends Mixin2(AbstractBase) {
abstractBaseMethod() {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/1/output.ts | TypeScript | interface Mixin1__2 {
mixinMethod__0(): void;
}
abstract class AbstractBase__2 {
abstract abstractBaseMethod(): void;
}
function Mixin2__2<TBase__4 extends abstract new(...args: any[]) => any>(baseClass__4: TBase__4) {
abstract class MixinClass__4 extends baseClass__4 implements Mixin1__2 {
mixinMethod(): void {}
static staticMixinMethod(): void {}
}
return MixinClass__4;
}
class DerivedFromAbstract2__2 extends Mixin2__2(AbstractBase__2) {
abstractBaseMethod() {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/2/input.ts | TypeScript | type Movable = {
move(distance: number): void;
};
const car = {
start() { },
move(d) {
// d should be number
},
stop() { }
} satisfies Movable & Record<string, unknown>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/2/output.ts | TypeScript | type Movable__2 = {
move__0(distance: number): void;
};
const car__2 = {
start () {},
move (d__4) {},
stop () {}
} satisfies Movable__2 & Record<string, unknown>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/3/input.ts | TypeScript | type Movable = {
move(distance: number): void;
};
const car = {
start() { },
move(d) {
// d should be number
},
stop() { }
} as Movable & Record<string, unknown>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/stc/3/output.ts | TypeScript | type Movable__2 = {
move__0(distance: number): void;
};
const car__2 = {
start () {},
move (d__4) {},
stop () {}
} as Movable__2 & Record<string, unknown>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_as_operator_ambiguity_1/input.ts | TypeScript | interface A<T> {
x: T;
}
interface B {
m: string;
}
// Make sure this is a type assertion to an array type, and not nested comparison operators.
var x: any;
var y = x as A<B>[];
var z = y[0].m; // z should be string
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_as_operator_ambiguity_1/output.ts | TypeScript | interface A__2<T__3> {
x__0: T__3;
}
interface B__2 {
m__0: string;
}
var x__2: any;
var y__2 = x__2 as A__2<B__2>[];
var z__2 = y__2[0].m;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_as_operator_ambiguity_2/input.ts | TypeScript | module Top {
interface A<T> {
x: T;
}
interface B {
m: string;
}
var x: any;
var y = x as A<B>[];
var z = y[0].m; // z should be string
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_as_operator_ambiguity_2/output.ts | TypeScript | namespace Top__2 {
interface A__3<T__4> {
x__0: T__4;
}
interface B__3 {
m__0: string;
}
var x__3: any;
var y__3 = x__3 as A__3<B__3>[];
var z__3 = y__3[0].m;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_async_await_nested_class_es5/input.ts | TypeScript | class A {
static B = class B {
static func2(): Promise<void> {
return new Promise((resolve) => {
resolve(null);
});
}
static C = class C {
static async func() {
await B.func2();
}
};
};
}
A.B.C.func();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_async_await_nested_class_es5/output.ts | TypeScript | class A__2 {
static B = class B__3 {
static func2(): Promise<void> {
return new Promise((resolve__5)=>{
resolve__5(null);
});
}
static C = class C__6 {
static async func() {
await B__3.func2();
}
};
};
}
A__2.B.C.func();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_for_of_statements_for_of_23_01/input.ts | TypeScript | for (const v of new FooIterator()) {
const v = 0; // new scope
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_for_of_statements_for_of_23_01/output.ts | TypeScript | for (const v__3 of new FooIterator()){
const v__4 = 0;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_if_do_while_statements_01/input.ts | TypeScript | module M {
export class A {
name: string;
}
export function F2(x: number): string {
return x.toString();
}
}
module N {
export class A {
id: number;
}
export function F2(x: number): string {
return x.toString();
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_if_do_while_statements_01/output.ts | TypeScript | namespace M__2 {
export class A__3 {
name: string;
}
export function F2__3(x__4: number): string {
return x__4.toString();
}
}
namespace N__2 {
export class A__5 {
id: number;
}
export function F2__5(x__6: number): string {
return x__6.toString();
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_import_type_qualifier/input.ts | TypeScript | import { MyClass } from "./MyClass.ts";
const test = new MyClass();
// MyClass identifier here should be different
// than the one above.
export type MyType = import("./deps.ts").MyClass;
export type MyType2 = import("./deps.ts").MyClass<MyClass>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_import_type_qualifier/output.ts | TypeScript | import { MyClass__2 } from "./MyClass.ts";
const test__2 = new MyClass__2();
export type MyType__2 = import("./deps.ts").MyClass__0;
export type MyType2__2 = import("./deps.ts").MyClass__0<MyClass__2>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_local_types_4_1/input.ts | TypeScript | function f1() {
// Type parameters are in scope in parameters and return types
function f<T>(x: T): T {
return undefined;
}
}
function f2() {
// Local types are not in scope in parameters and return types
function f(x: T): T {
interface T {}
return undefined;
}
}
function f3() {
// Type parameters and top-level local types are in same declaration space
function f<T>() {
interface T {}
return undefined;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_local_types_4_1/output.ts | TypeScript | function f1__2() {
function f__3<T__4>(x__4: T__4): T__4 {
return undefined;
}
}
function f2__2() {
function f__5(x__6: T): T {
interface T__6 {
}
return undefined;
}
}
function f3__2() {
function f__7<T__8>() {
interface T__8 {
}
return undefined;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_local_types_4_2/input.ts | TypeScript | function f2() {
// Local types are not in scope in parameters and return types
function f(x: T): T {
interface T {}
return undefined;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_local_types_4_2/output.ts | TypeScript | function f2__2() {
function f__3(x__4: T): T {
interface T__4 {
}
return undefined;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_mapped_type_as_clauses_01/input.ts | TypeScript | type Lazyify<T> = {
[K in keyof T as `get${Capitalize<K & string>}`]: () => T[K];
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_mapped_type_as_clauses_01/output.ts | TypeScript | type Lazyify__2<T__3> = {
[K__3 in keyof T__3 as `get${Capitalize<K__3 & string>}`]: () => T__3[K__3];
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_module_name_1/input.ts | TypeScript | module Top {
module A {
export function b() {}
}
A.b();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_module_name_1/output.ts | TypeScript | namespace Top__2 {
namespace A__3 {
export function b__4() {}
}
A__3.b();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_001/input.ts | TypeScript | type A = B;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_001/output.ts | TypeScript | type A__2 = B;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_002/input.ts | TypeScript | class A {}
new A();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_002/output.ts | TypeScript | class A__2 {
}
new A__2();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_catch_param/input.ts | TypeScript | function wrapper(...args) {
try {
return target(...args);
} catch (err) {
switch (err.name) {
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_catch_param/output.ts | TypeScript | function wrapper__2(...args__3) {
try {
return target(...args__3);
} catch (err__5) {
switch(err__5.name){
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_deno_undef_001/input.ts | TypeScript | const directiveHandlers: DirectiveHandlers = {
TAG(state, _name, ...args: string[]): void {
const handle = args[0];
if (!PATTERN_TAG_HANDLE.test(handle)) {
}
},
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_deno_undef_001/output.ts | TypeScript | const directiveHandlers__2: DirectiveHandlers = {
TAG (state__3, _name__3, ...args__3: string[]): void {
const handle__3 = args__3[0];
if (!PATTERN_TAG_HANDLE.test(handle__3)) {}
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/input.ts | TypeScript | import { Nullable } from "nullable";
import { Component } from "react";
class Foo extends Component<Nullable, {}> {}
new Foo();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/output.ts | TypeScript | import { Nullable__2 } from "nullable";
import { Component__2 } from "react";
class Foo__2 extends Component__2<Nullable__2, {
}> {
}
new Foo__2();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_implements/input.ts | TypeScript | import { Nullable } from "nullable";
import { Component } from "react";
class Foo implements Component<Nullable> {}
new Foo();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_implements/output.ts | TypeScript | import { Nullable__2 } from "nullable";
import { Component__2 } from "react";
class Foo__2 implements Component__2<Nullable__2> {
}
new Foo__2();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_type_ann/input.ts | TypeScript | import { Nullable } from "nullable";
const a: Nullable<string> = "hello";
console.log(a);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_type_ann/output.ts | TypeScript | import { Nullable__2 } from "nullable";
const a__2: Nullable__2<string> = "hello";
console.log(a__2);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_type_param/input.ts | TypeScript | import { Nullable } from "nullable";
import { SomeOther } from "other";
const a: Nullable<SomeOther> = "hello";
console.log(a);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_type_param/output.ts | TypeScript | import { Nullable__2 } from "nullable";
import { SomeOther__2 } from "other";
const a__2: Nullable__2<SomeOther__2> = "hello";
console.log(a__2);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_method_type_param/input.ts | TypeScript | import { Nullable } from "nullable";
import { Another } from "some";
class A {
do(): Nullable<Another> {
return null;
}
}
new A();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_method_type_param/output.ts | TypeScript | import { Nullable__2 } from "nullable";
import { Another__2 } from "some";
class A__2 {
do(): Nullable__2<Another__2> {
return null;
}
}
new A__2();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_enum/input.ts | TypeScript |
enum Foo {
name: string
}
function foo() {
enum Foo {
name: string
}
const foo = {} as Foo;
}
const bar = {} as Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_enum/output.ts | TypeScript | enum Foo__2 {
name__0,
string__0
}
function foo__2() {
enum Foo__3 {
name__0,
string__0
}
const foo__3 = {} as Foo__3;
}
const bar__2 = {} as Foo__2;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_interface/input.ts | TypeScript | interface Foo {
name: string;
}
function foo() {
interface Foo {
name: string;
}
const foo = {} as Foo;
}
const bar = {} as Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_interface/output.ts | TypeScript | interface Foo__2 {
name__0: string;
}
function foo__2() {
interface Foo__3 {
name__0: string;
}
const foo__3 = {} as Foo__3;
}
const bar__2 = {} as Foo__2;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_type_alias/input.ts | TypeScript | type Foo = {};
function foo() {
type Foo = string | number;
const foo = {} as Foo;
}
const bar = {} as Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_type_alias/output.ts | TypeScript | type Foo__2 = {
};
function foo__2() {
type Foo__3 = string | number;
const foo__3 = {} as Foo__3;
}
const bar__2 = {} as Foo__2;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_type_ref/input.ts | TypeScript | import { Nullable } from "nullable";
import { SomeOther } from "some";
import { Another } from "some";
class A extends Nullable {
other: Nullable<Another>;
}
new A();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_nested_type_ref/output.ts | TypeScript | import { Nullable__2 } from "nullable";
import { SomeOther__2 } from "some";
import { Another__2 } from "some";
class A__2 extends Nullable__2 {
other: Nullable__2<Another__2>;
}
new A__2();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_parameter/input.ts | TypeScript | new Promise((resolve: () => void, _) => {
setTimeout(resolve, 100);
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_parameter/output.ts | TypeScript | new Promise((resolve__3: () => void, ___3)=>{
setTimeout(resolve__3, 100);
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_parameter_property/input.ts | TypeScript | class PartWriter implements Deno.Writer {
constructor(
private writer: Deno.Writer,
readonly boundary: string,
public headers: Headers,
isFirstBoundary: boolean
) {
let buf = "";
if (isFirstBoundary) {
buf += `--${boundary}\r\n`;
} else {
buf += `\r\n--${boundary}\r\n`;
}
for (const [key, value] of headers.entries()) {
buf += `${key}: ${value}\r\n`;
}
buf += `\r\n`;
this.partHeader = buf;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_parameter_property/output.ts | TypeScript | class PartWriter__2 implements Deno.Writer {
constructor(private writer__3: Deno.Writer, readonly boundary__3: string, public headers__3: Headers, isFirstBoundary__3: boolean){
let buf__3 = "";
if (isFirstBoundary__3) {
buf__3 += `--${boundary__3}\r\n`;
} else {
buf__3 += `\r\n--${boundary__3}\r\n`;
}
for (const [key__6, value__6] of headers__3.entries()){
buf__3 += `${key__6}: ${value__6}\r\n`;
}
buf__3 += `\r\n`;
this.partHeader = buf__3;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_type_aliases_do_not_merge/input.ts | TypeScript | export type A = {};
type A = {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_type_aliases_do_not_merge/output.ts | TypeScript | export type A__2 = {
};
type A__2 = {
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_simple/input.ts | TypeScript | let a;
{
let a;
let b;
{
let a;
let b;
let c;
}
{
let a;
let b;
let c;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_simple/output.ts | TypeScript | let a__2;
{
let a__3;
let b__3;
{
let a__4;
let b__4;
let c__4;
}
{
let a__5;
let b__5;
let c__5;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_type_parameter_used_as_type_parameter_contraint_01/input.ts | TypeScript | var f3 = <T, U extends T>(x: T, y: U) => {
function bar<V extends T, W extends U>() {
var g = <X extends W, Y extends V>(a: X, b: Y): T => {
x = y;
return y;
};
}
};
var f4 = <U extends T, T>(x: T, y: U) => {
function bar<V extends T, W extends U>() {
var g = <X extends W, Y extends V>(a: X, b: Y): T => {
x = y;
return y;
};
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/ts_type_parameter_used_as_type_parameter_contraint_01/output.ts | TypeScript | var f3__2 = <T__3, U__3 extends T__3>(x__3: T__3, y__3: U__3)=>{
function bar__3<V__4 extends T__3, W__4 extends U__3>() {
var g__4 = <X__5 extends W__4, Y__5 extends V__4>(a__5: X__5, b__5: Y__5): T__3 =>{
x__3 = y__3;
return y__3;
};
}
};
var f4__2 = <U__6 extends T__6, T__6>(x__6: T__6, y__6: U__6)=>{
function bar__6<V__7 extends T__6, W__7 extends U__6>() {
var g__7 = <X__8 extends W__7, Y__8 extends V__7>(a__8: X__8, b__8: Y__8): T__6 =>{
x__6 = y__6;
return y__6;
};
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/computed/property/name/11/input.ts | TypeScript | 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_transforms_base/tests/ts-resolver/tsc/computed/property/name/11/output.ts | TypeScript | var s__2: string;
var n__2: number;
var a__2: any;
var v__2 = {
get [s__2] () {
return 0;
},
set [n__2] (v__4){},
get [s__2 + s__2] () {
return 0;
},
set [s__2 + n__2] (v__7){},
get [+s__2] () {
return 0;
},
set [""] (v__10){},
get [0] () {
return 0;
},
set [a__2] (v__13){},
get [<any>true] () {
return 0;
},
set [`hello bye`] (v__16){},
get [`hello ${a__2} bye`] () {
return 0;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/generatedContextualTyping/1/input.ts | TypeScript | class x87 {
constructor(
parm: () => Base[] = function named() {
return [d1, d2];
}
) {}
}
class x90 {
constructor(
parm: { (): Base[] } = function named() {
return [d1, d2];
}
) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/generatedContextualTyping/1/output.ts | TypeScript | class x87__2 {
constructor(parm__3: () => Base[] = function named__4() {
return [
d1,
d2
];
}){}
}
class x90__2 {
constructor(parm__6: {
() : Base[];
} = function named__7() {
return [
d1,
d2
];
}){}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/generic-call-type-argument-inference/input.ts | TypeScript | class C<T, U> {
constructor(public t: T, public u: U) {}
foo(t: T, u: U) {
return t;
}
foo2(t: T, u: U) {
return u;
}
foo3<T>(t: T, u: U) {
return t;
}
foo4<U>(t: T, u: U) {
return t;
}
foo5<T, U>(t: T, u: U) {
return t;
}
foo6<T, U>() {
var x: T;
return x;
}
foo7<T, U>(u: U) {
var x: T;
return x;
}
foo8<T, U>() {
var x: T;
return x;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/generic-call-type-argument-inference/output.ts | TypeScript | class C__2<T__3, U__3> {
constructor(public t__4: T__3, public u__4: U__3){}
foo(t__5: T__3, u__5: U__3) {
return t__5;
}
foo2(t__6: T__3, u__6: U__3) {
return u__6;
}
foo3<T__7>(t__7: T__7, u__7: U__3) {
return t__7;
}
foo4<U__8>(t__8: T__3, u__8: U__8) {
return t__8;
}
foo5<T__9, U__9>(t__9: T__9, u__9: U__9) {
return t__9;
}
foo6<T__10, U__10>() {
var x__10: T__10;
return x__10;
}
foo7<T__11, U__11>(u__11: U__11) {
var x__11: T__11;
return x__11;
}
foo8<T__12, U__12>() {
var x__12: T__12;
return x__12;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/typeParameterUsedAsTypeParameterConstraint4.ts/input.ts | TypeScript | // Type parameters are in scope in their own and other type parameter lists
// Some negative cases
class C<T, U extends T, V extends U> {
z: W; // error
foo<W extends V>(x: W): T {
var r: T;
return x;
}
}
interface I<T, U extends T, V extends U> {
x: T;
y: U;
z: W; // error
foo<W extends V>(x: W): T;
}
function foo<T, U extends T>(x: T, y: U): V {
// error
function bar<V extends T, W extends U>(): X {
// error
function baz<X extends W, Y extends V>(a: X, b: Y): T {
x = y;
return y;
}
}
}
function foo2<U extends T, T>(x: T, y: U): W {
// error
function bar<V extends T, W extends U>(): Y {
// error
function baz<X extends W, Y extends V>(a: X, b: Y): T {
x = y;
return y;
}
}
}
var f3 = <T, U extends T>(x: T, y: U) => {
function bar<V extends T, W extends U>(r: X, s: Y) {
// error
var g = <X extends W, Y extends V>(a: X, b: Y): T => {
x = y;
return y;
};
}
};
var f4 = <U extends T, T>(x: V, y: X) => {
// error
function bar<V extends T, W extends U>() {
var g = <X extends W, Y extends V>(a: X, b: Y): T => {
x = y;
return y;
};
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/typeParameterUsedAsTypeParameterConstraint4.ts/output.ts | TypeScript | class C__2<T__3, U__3 extends T__3, V__3 extends U__3> {
z: W;
foo<W__4 extends V__3>(x__4: W__4): T__3 {
var r__4: T__3;
return x__4;
}
}
interface I__2<T__5, U__5 extends T__5, V__5 extends U__5> {
x__0: T__5;
y__0: U__5;
z__0: W;
foo__0<W__6 extends V__5>(x__6: W__6): T__5;
}
function foo__2<T__7, U__7 extends T__7>(x__7: T__7, y__7: U__7): V {
function bar__7<V__8 extends T__7, W__8 extends U__7>(): X {
function baz__8<X__9 extends W__8, Y__9 extends V__8>(a__9: X__9, b__9: Y__9): T__7 {
x__7 = y__7;
return y__7;
}
}
}
function foo2__2<U__10 extends T__10, T__10>(x__10: T__10, y__10: U__10): W {
function bar__10<V__11 extends T__10, W__11 extends U__10>(): Y {
function baz__11<X__12 extends W__11, Y__12 extends V__11>(a__12: X__12, b__12: Y__12): T__10 {
x__10 = y__10;
return y__10;
}
}
}
var f3__2 = <T__13, U__13 extends T__13>(x__13: T__13, y__13: U__13)=>{
function bar__13<V__14 extends T__13, W__14 extends U__13>(r__14: X, s__14: Y) {
var g__14 = <X__15 extends W__14, Y__15 extends V__14>(a__15: X__15, b__15: Y__15): T__13 =>{
x__13 = y__13;
return y__13;
};
}
};
var f4__2 = <U__16 extends T__16, T__16>(x__16: V, y__16: X)=>{
function bar__16<V__17 extends T__16, W__17 extends U__16>() {
var g__17 = <X__18 extends W__17, Y__18 extends V__17>(a__18: X__18, b__18: Y__18): T__16 =>{
x__16 = y__16;
return y__16;
};
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/types/type/aliases/type/aliases/1/input.ts | TypeScript | interface I6 {
x: string;
}
type T6 = I6;
var x6: I6;
var x6: T6;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_base/tests/ts-resolver/tsc/types/type/aliases/type/aliases/1/output.ts | TypeScript | interface I6__2 {
x__0: string;
}
type T6__2 = I6__2;
var x6__2: I6__2;
var x6__2: T6__2;
| 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.