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_typescript/tests/fixture/constructor-2/output.js | JavaScript | class Foo {
constructor(foo){
this.foo = foo;
this.bar = 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/deno-12395/input.ts | TypeScript | import * as mongo from "https://deno.land/x/mongo@v0.27.0/mod.ts";
import MongoClient = mongo.MongoClient;
const mongoClient = new MongoClient();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/deno-12395/output.js | JavaScript | import * as mongo from "https://deno.land/x/mongo@v0.27.0/mod.ts";
const MongoClient = mongo.MongoClient;
const mongoClient = new MongoClient();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/export-equals/input.ts | TypeScript | export = Foo | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/export-equals/output.js | JavaScript | module.exports = Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/export-import/input.ts | TypeScript | export import A = B | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/export-import/output.js | JavaScript | export const A = B;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-10097/input.ts | TypeScript | const enum A {
A,
}
export enum B {
B,
}
{
const enum C {
C,
}
}
label: const enum D {
D,
}
if (Math.random())
const enum E {
E,
}
else
const enum F {
F,
}
while (Math.random())
const enum G {
G,
}
do
const enum H {
H,
}
while (Math.random());
for (const _ of Math.random())
const enum I {
I,
}
switch (Math.random()) {
case 1:
const enum J {
J,
}
}
;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-10097/output.js | JavaScript | export var B = /*#__PURE__*/ function(B) {
B[B["B"] = 0] = "B";
return B;
}({});
{}label: ;
if (Math.random()) ;
else ;
while(Math.random());
do ;
while (Math.random())
for (const _ of Math.random());
switch(Math.random()){
case 1:
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-1653/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_typescript/tests/fixture/issue-1653/output.js | JavaScript | (function(X) {
(function(Z) {
Z.foo = 0;
})(X.Z || (X.Z = {}));
})(X || (X = {}));
(function(Y) {
(function(Z) {
Z.bar = 1;
})(Y.Z || (Y.Z = {}));
})(Y || (Y = {}));
var X, Y;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-179/1/input.ts | TypeScript | import { Types } from 'other';
const a: Types.foo = {}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-179/1/output.js | JavaScript | const a = {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-179/2/input.ts | TypeScript | import { Types } from 'other';
const a: Types = Types.foo; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-179/2/output.js | JavaScript | import { Types } from 'other';
const a = Types.foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-196/1/input.ts | TypeScript | export type Link = { key: string; text: string }; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-196/2/input.ts | TypeScript | type Link = { key: string; text: string };
export { Link } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-196/3/input.ts | TypeScript | type Link = { key: string; text: string };
const Link = 'Boo';
export { Link } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-196/3/output.js | JavaScript | const Link = 'Boo';
export { Link };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2234/input.ts | TypeScript | namespace Shapes {
export namespace Polygons {
export class Triangle {}
export class Square {}
}
}
import polygons = Shapes.Polygons;
let sq = new polygons.Square();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2234/output.js | JavaScript | (function(Shapes) {
(function(Polygons) {
class Triangle {
}
Polygons.Triangle = Triangle;
class Square {
}
Polygons.Square = Square;
})(Shapes.Polygons || (Shapes.Polygons = {}));
})(Shapes || (Shapes = {}));
const polygons = Shapes.Polygons;
let sq = new polygons.Square();
var Shapes;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2243/input.ts | TypeScript | export type Colors = 0.0 | 1.0 | 2.0;
export function Colors(member: Colors.KeyType): Colors {
return Colors.ValueFor(member);
}
export module Colors {
export type KeyType = keyof typeof ValueMap;
export const ValueMap = {
Red: { value: 0.0, label: "Red" },
Blue: { value: 1.0, label: "Blue" },
Green: { value: 2.0, label: "Green" },
} as const;
export const Values: Colors[] = [0.0, 1.0, 2.0];
export function ValueFor(member: KeyType): Colors {
return ValueMap[member]?.value;
}
export async function LabelFor(
member: KeyType
): Promise<string | undefined> {
return ValueMap[member]?.label;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2243/output.js | JavaScript | export function Colors(member) {
return Colors.ValueFor(member);
}
(function(Colors) {
Colors.ValueMap = {
Red: {
value: 0.0,
label: "Red"
},
Blue: {
value: 1.0,
label: "Blue"
},
Green: {
value: 2.0,
label: "Green"
}
};
Colors.Values = [
0.0,
1.0,
2.0
];
function ValueFor(member) {
return Colors.ValueMap[member]?.value;
}
Colors.ValueFor = ValueFor;
async function LabelFor(member) {
return Colors.ValueMap[member]?.label;
}
Colors.LabelFor = LabelFor;
})(Colors || (Colors = {}));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-236/input.ts | TypeScript | function foo(this: any, $scope: angular.IScope) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-236/output.js | JavaScript | function foo($scope) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2669/1/input.ts | TypeScript | export namespace TEST {
export const VALUE = "value";
}
export default TEST;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2669/1/output.js | JavaScript | (function(TEST) {
TEST.VALUE = "value";
})(TEST || (TEST = {}));
export default TEST;
export var TEST;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2670/input.ts | TypeScript | export namespace TEST {
export const VAL1 = "value1";
export const VAL2 = `${VAL1}_value2`;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-2670/output.js | JavaScript | (function(TEST) {
TEST.VAL1 = "value1";
TEST.VAL2 = `${TEST.VAL1}_value2`;
})(TEST || (TEST = {}));
export var TEST;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3001/1/input.ts | TypeScript | var x = 4;
enum Foo {
a,
b = a,
c = b + 1,
d = 1 + c * x,
e = 2 * d,
f = Foo.e * 10,
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3001/1/output.js | JavaScript | var x = 4;
var Foo = /*#__PURE__*/ function(Foo) {
Foo[Foo["a"] = 0] = "a";
Foo[Foo["b"] = 0] = "b";
Foo[Foo["c"] = 1] = "c";
Foo[Foo["d"] = 1 + Foo.c * x] = "d";
Foo[Foo["e"] = 2 * Foo.d] = "e";
Foo[Foo["f"] = Foo.e * 10] = "f";
return Foo;
}(Foo || {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3001/2/input.ts | TypeScript | var x = 10;
enum Foo {
a = 10,
b = a,
c = b + x,
d = c,
}
enum Bar {
a = 1,
b = Foo.a,
E = b,
F = Math.E,
}
enum Baz {
a = 0,
b = 1,
// @ts-ignore
x = a.toString(),
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3001/2/output.js | JavaScript | var x = 10;
var Foo = /*#__PURE__*/ function(Foo) {
Foo[Foo["a"] = 10] = "a";
Foo[Foo["b"] = 10] = "b";
Foo[Foo["c"] = 10 + x] = "c";
Foo[Foo["d"] = Foo.c] = "d";
return Foo;
}(Foo || {});
var Bar = /*#__PURE__*/ function(Bar) {
Bar[Bar["a"] = 1] = "a";
Bar[Bar["b"] = 10] = "b";
Bar[Bar["E"] = 10] = "E";
Bar[Bar["F"] = Math.E] = "F";
return Bar;
}(Bar || {});
var Baz = /*#__PURE__*/ function(Baz) {
Baz[Baz["a"] = 0] = "a";
Baz[Baz["b"] = 1] = "b";
// @ts-ignore
Baz[Baz["x"] = Baz.a.toString()] = "x";
return Baz;
}(Baz || {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/1/input.ts | TypeScript | namespace Foo {
export const { a } = { a: 1 };
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/1/output.js | JavaScript | (function(Foo) {
({ a: Foo.a } = {
a: 1
});
})(Foo || (Foo = {}));
var Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/2/input.ts | TypeScript | namespace Bar {
export const { a, b } = { a: 1, b: 2 };
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/2/output.js | JavaScript | (function(Bar) {
({ a: Bar.a, b: Bar.b } = {
a: 1,
b: 2
});
})(Bar || (Bar = {}));
var Bar;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/3/input.ts | TypeScript | namespace Baz {
export const baz = { a: 1, b: 2 };
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/3/output.js | JavaScript | (function(Baz) {
Baz.baz = {
a: 1,
b: 2
};
})(Baz || (Baz = {}));
var Baz;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/4/input.ts | TypeScript | module A {
const a = 1;
const b = 2;
export const { a: A } = { a };
export const { b: B } = { b };
}
namespace A {
const c = 3;
const d = 4;
export const { c: C } = { c: c };
export const { d: D } = { d: d };
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3073/4/output.js | JavaScript | (function(A) {
const a = 1;
const b = 2;
({ a: A.A } = {
a
});
({ b: A.B } = {
b
});
})(A || (A = {}));
(function(A) {
const c = 3;
const d = 4;
({ c: A.C } = {
c: c
});
({ d: A.D } = {
d: d
});
})(A || (A = {}));
var A;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3158/1/input.ts | TypeScript | namespace Foo {
export const bar = 42;
export const foo = function () {
return 20;
};
export function xyz() {
return foo() * bar;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3158/1/output.js | JavaScript | (function(Foo) {
Foo.bar = 42;
Foo.foo = function() {
return 20;
};
function xyz() {
return Foo.foo() * Foo.bar;
}
Foo.xyz = xyz;
})(Foo || (Foo = {}));
var Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3158/2/input.ts | TypeScript | namespace Test {
export function abc() {
return 10;
}
export const foo = function () {
return 20;
};
export function xyz() {
return abc() * foo();
}
}
Test.xyz();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3158/2/output.js | JavaScript | (function(Test) {
function abc() {
return 10;
}
Test.abc = abc;
Test.foo = function() {
return 20;
};
function xyz() {
return abc() * Test.foo();
}
Test.xyz = xyz;
})(Test || (Test = {}));
Test.xyz();
var Test;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3228/1/input.ts | TypeScript | export class StaticTestClass {
static testProp = "Hello world!";
static testMethod = () => {
console.log(this.testProp);
};
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3228/1/output.js | JavaScript | export class StaticTestClass {
}
StaticTestClass.testProp = "Hello world!";
StaticTestClass.testMethod = ()=>{
console.log(StaticTestClass.testProp);
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3338/1/input.ts | TypeScript | enum Status {
"foo" = "111",
"boo" = "222",
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3338/1/output.js | JavaScript | var Status = /*#__PURE__*/ function(Status) {
Status["foo"] = "111";
Status["boo"] = "222";
return Status;
}(Status || {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3454/1/input.ts | TypeScript | export namespace a.b {
export interface i {
baz?: string;
}
}
export namespace a.b {
export enum e {
FOO = "BAR",
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3454/1/output.js | JavaScript | (function(a) {
(function(b) {
(function(e) {
e["FOO"] = "BAR";
})(b.e || (b.e = {}));
})(a.b || (a.b = {}));
})(a || (a = {}));
export var a;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-357/input.ts | TypeScript | export function addProp<T, K extends string, V>(
obj: T,
prop: K,
value: V
): T & { [x in K]: V };
export function addProp<T, K extends string, V>(
prop: K,
value: V
): (obj: T) => T & { [x in K]: V };
export function addProp(arg1: any, arg2: any, arg3?: any): any {
if (arguments.length === 2) {
return (object: any) => _addProp(object, arg1, arg2);
}
return _addProp(arg1, arg2, arg3);
}
function _addProp(obj: any, prop: string, value: any) {
return {
...obj,
[prop]: value,
};
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-357/output.js | JavaScript | export function addProp(arg1, arg2, arg3) {
if (arguments.length === 2) {
return (object)=>_addProp(object, arg1, arg2);
}
return _addProp(arg1, arg2, arg3);
}
function _addProp(obj, prop, value) {
return {
...obj,
[prop]: value
};
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-366/1/input.ts | TypeScript | class App {
public enter?(): void;
public leave?(): void;
public destroy?(): void;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-366/1/output.js | JavaScript | class App {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-366/2/input.ts | TypeScript | function enter(): string;
function enter(foo: string): number; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3711/1/input.ts | TypeScript | enum A {
X1,
X15 = "x15",
X2 = 6,
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-3711/1/output.js | JavaScript | var A = /*#__PURE__*/ function(A) {
A[A["X1"] = 0] = "X1";
A["X15"] = "x15";
A[A["X2"] = 6] = "X2";
return A;
}(A || {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-392/1/input.ts | TypeScript | import { PlainObject } from 'simplytyped';
const dict: PlainObject = {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-392/1/output.js | JavaScript | const dict = {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4393/1/input.ts | TypeScript | namespace foo {
export const bar = 0;
}
export { foo };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4393/1/output.js | JavaScript | (function(foo) {
foo.bar = 0;
})(foo || (foo = {}));
export { foo };
var foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4393/2/input.ts | TypeScript | const foo = 1;
export { foo };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4393/2/output.js | JavaScript | const foo = 1;
export { foo };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4481/1/input.ts | TypeScript | import * as I from "./ABC";
export namespace IE {
export import A = I.A;
export import C = I.C;
export import D = I.D;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-4481/1/output.js | JavaScript | import * as I from "./ABC";
(function(IE) {
IE.A = I.A;
IE.C = I.C;
IE.D = I.D;
})(IE || (IE = {}));
export var IE;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-5947/input.ts | TypeScript | let a, b;
[a as number, b as number] = [1, 2];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-5947/output.js | JavaScript | let a, b;
[a, b] = [1, 2];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6598/input.ts | TypeScript | import { type BadgeProps } from './badge.js';
export { BadgeProps }; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6923/input.tsx | TypeScript (TSX) | import React from "react";
import ReactDOM from "react-dom";
import { _Component } from "./Component";
const App = (
<div>
<_Component></_Component>
<p>Hello World</p>
</div>
);
ReactDOM.render(App, window.document.getElementById("react_root"));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6923/output.js | JavaScript | import ReactDOM from "react-dom";
import { _Component } from "./Component";
const App = React.createElement("div", null, React.createElement(_Component, null), React.createElement("p", null, "Hello World"));
ReactDOM.render(App, window.document.getElementById("react_root"));
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6953/1/input.ts | TypeScript | import { Scope } from "../../scopes";
import {
AnyNode,
TSUnknownKeywordTypeAnnotation,
tsUnknownKeywordTypeAnnotation,
} from "@internal/ast";
export default function TSUnknownKeywordTypeAnnotation(
node: AnyNode,
scope: Scope,
) {
node = tsUnknownKeywordTypeAnnotation.assert(node);
scope;
throw new Error("unimplemented");
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6953/1/output.js | JavaScript | import { tsUnknownKeywordTypeAnnotation } from "@internal/ast";
export default function TSUnknownKeywordTypeAnnotation(node, scope) {
node = tsUnknownKeywordTypeAnnotation.assert(node);
scope;
throw new Error("unimplemented");
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case1/input.ts | TypeScript | class SomeClass {
accessor() {
return 'accessor';
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case1/output.js | JavaScript | class SomeClass {
accessor() {
return 'accessor';
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case2/input.ts | TypeScript | class SomeClass {
accessor accessor: 'accessor'
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case2/output.js | JavaScript | class SomeClass {
accessor accessor;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case3/input.ts | TypeScript | class SomeClass {
static accessor() {
return 'accessor';
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7042/case3/output.js | JavaScript | class SomeClass {
static accessor() {
return 'accessor';
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7076/1/input.ts | TypeScript | import { A } from "./a.ts";
export { type A };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7539/input.tsx | TypeScript (TSX) | /* @jsx h */
/* @jsxFrag null */
<></>; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-7539/output.js | JavaScript | /* @jsx h */ /* @jsxFrag null */ React.createElement(React.Fragment, null);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8007/1/input.ts | TypeScript | import { useMemo } from "react";
import { type SerializedStyles, type Theme, css } from "@emotion/react";
import { type Breakpoint, theme } from "antd";
import { useMediaQuery } from "./hooks";
export { type Breakpoint } from "antd";
export const getMQ = (token: Theme["token"]) => ({
xsMin: `@media (min-width: ${token.screenXSMin}px)`,
xsMax: `@media (max-width: ${token.screenXSMax}px)`,
smMin: `@media (min-width: ${token.screenSMMin}px)`,
smMax: `@media (max-width: ${token.screenSMMax}px)`,
mdMin: `@media (min-width: ${token.screenMDMin}px)`,
mdMax: `@media (max-width: ${token.screenMDMax}px)`,
lgMin: `@media (min-width: ${token.screenLGMin}px)`,
lgMax: `@media (max-width: ${token.screenLGMax}px)`,
xlMin: `@media (min-width: ${token.screenXLMin}px)`,
xlMax: `@media (max-width: ${token.screenXLMax}px)`,
xxlMin: `@media (min-width: ${token.screenXXLMin}px)`,
});
export const useBreakpoint = (breakpoint: Breakpoint) => {
const { token } = theme.useToken();
const query = useMemo(() => {
const key =
breakpoint === "xs"
? "xsMax"
: (`${breakpoint}Min` satisfies `${Breakpoint}Min`);
return getMQ(token)[key].replace("@media ", "");
}, [breakpoint, token]);
return useMediaQuery(query);
};
export const createStyles = <
T extends Record<
string,
SerializedStyles | ((theme: Theme) => SerializedStyles)
>
>(
arg: T
) => arg;
/**
* Reusable styles
*/
export const centeredCss = css({
display: "grid",
placeContent: "center",
height: "100%",
});
export const fullVPHeightCss = css({
height: "100vh",
});
export const noMargin = css({
margin: "0 !important",
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8007/1/output.js | JavaScript | import { useMemo } from "react";
import { css } from "@emotion/react";
import { theme } from "antd";
import { useMediaQuery } from "./hooks";
export const getMQ = (token)=>({
xsMin: `@media (min-width: ${token.screenXSMin}px)`,
xsMax: `@media (max-width: ${token.screenXSMax}px)`,
smMin: `@media (min-width: ${token.screenSMMin}px)`,
smMax: `@media (max-width: ${token.screenSMMax}px)`,
mdMin: `@media (min-width: ${token.screenMDMin}px)`,
mdMax: `@media (max-width: ${token.screenMDMax}px)`,
lgMin: `@media (min-width: ${token.screenLGMin}px)`,
lgMax: `@media (max-width: ${token.screenLGMax}px)`,
xlMin: `@media (min-width: ${token.screenXLMin}px)`,
xlMax: `@media (max-width: ${token.screenXLMax}px)`,
xxlMin: `@media (min-width: ${token.screenXXLMin}px)`
});
export const useBreakpoint = (breakpoint)=>{
const { token } = theme.useToken();
const query = useMemo(()=>{
const key = breakpoint === "xs" ? "xsMax" : `${breakpoint}Min`;
return getMQ(token)[key].replace("@media ", "");
}, [
breakpoint,
token
]);
return useMediaQuery(query);
};
export const createStyles = (arg)=>arg;
/**
* Reusable styles
*/ export const centeredCss = css({
display: "grid",
placeContent: "center",
height: "100%"
});
export const fullVPHeightCss = css({
height: "100vh"
});
export const noMargin = css({
margin: "0 !important"
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8007/2/input.ts | TypeScript | import { A } from 'mod';
const foo = <
T extends ((A: any) => void),
>(
arg: T,
) => arg;
console.log(A); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8007/2/output.js | JavaScript | import { A } from 'mod';
const foo = (arg)=>arg;
console.log(A);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8011/input.ts | TypeScript | namespace API {
export let url = "/";
export function update(value: string) {
url = value;
}
}
API.update("/new");
console.log(API.url);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8011/output.js | JavaScript | (function(API) {
API.url = "/";
function update(value) {
API.url = value;
}
API.update = update;
})(API || (API = {}));
API.update("/new");
console.log(API.url);
var API;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8025/input.ts | TypeScript | namespace Foo {
export let { a = 1 } = {};
export const { b = 2 } = {};
export const [c = 3, { d = 4 } = {}] = [];
console.log("inner", a, b, c, d);
}
console.log("outer", Foo.a, Foo.b, Foo.c, Foo.d);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8025/output.js | JavaScript | (function(Foo) {
({ a: Foo.a = 1 } = {});
({ b: Foo.b = 2 } = {});
[Foo.c = 3, { d: Foo.d = 4 } = {}] = [];
console.log("inner", Foo.a, Foo.b, Foo.c, Foo.d);
})(Foo || (Foo = {}));
console.log("outer", Foo.a, Foo.b, Foo.c, Foo.d);
var Foo;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8124/input.ts | TypeScript | namespace Foo {
export var a = 1;
for (var a; a < 5; a++) { }
}
namespace Bar {
export var b = 2;
var b = 3;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8124/output.js | JavaScript | (function(Foo) {
Foo.a = 1;
for(var a; Foo.a < 5; Foo.a++){}
})(Foo || (Foo = {}));
(function(Bar) {
Bar.b = 2;
var b = 3;
})(Bar || (Bar = {}));
var Foo, Bar;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/input.ts | TypeScript | import { Schemas } from './types.d';
import AddressResource = Schemas.AddressResource;
// type usage
const x: AddressResource = {};
import { foo, bar } from "mod";
// value usage
import y = foo.y;
// type usage
import z = bar.z;
console.log(y as z);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/output.js | JavaScript | // type usage
const x = {};
import { foo } from "mod";
// value usage
const y = foo.y;
console.log(y);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-9486/input.ts | TypeScript | import { ns1 } from '../anotherFile';
import ns2 = ns1.ns2;
import Class = ns2.Class;
const a = new Class(5); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/issue-9486/output.js | JavaScript | import { ns1 } from '../anotherFile';
const ns2 = ns1.ns2;
const Class = ns2.Class;
const a = new Class(5);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/namespace-and-enum/input.ts | TypeScript | export enum E {
A = 1,
}
export enum E {
B = 2,
}
enum E1 {
C = 3,
}
enum E1 {
D = 4,
}
export namespace N {
export enum E {
A = 1,
}
export enum E {
B = 2,
}
enum E1 {
C = 3,
}
enum E1 {
D = 4,
}
}
export namespace N {
export enum E {
c = 3,
}
export enum E {
d = 4,
}
export namespace N1 {
export enum E2 {
e = 5,
}
}
export namespace N1 {
export enum E2 {
f = 6,
}
}
namespace N2 {
enum E3 {
g = 7,
}
}
}
export namespace N1 {
export enum E2 {
e = 5,
}
}
export namespace N1 {
export enum E2 {
f = 6,
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/namespace-and-enum/output.js | JavaScript | export var E = /*#__PURE__*/ function(E) {
E[E["A"] = 1] = "A";
return E;
}({});
(function(E) {
E[E["B"] = 2] = "B";
})(E);
var E1 = /*#__PURE__*/ function(E1) {
E1[E1["C"] = 3] = "C";
return E1;
}(E1 || {});
(function(E1) {
E1[E1["D"] = 4] = "D";
})(E1);
(function(N) {
(function(E) {
E[E["A"] = 1] = "A";
})(N.E || (N.E = {}));
(function(E) {
E[E["B"] = 2] = "B";
})(N.E);
let E1 = /*#__PURE__*/ function(E1) {
E1[E1["C"] = 3] = "C";
return E1;
}({});
(function(E1) {
E1[E1["D"] = 4] = "D";
})(E1);
})(N || (N = {}));
(function(N) {
(function(E) {
E[E["c"] = 3] = "c";
})(N.E || (N.E = {}));
(function(E) {
E[E["d"] = 4] = "d";
})(N.E);
(function(N1) {
(function(E2) {
E2[E2["e"] = 5] = "e";
})(N1.E2 || (N1.E2 = {}));
})(N.N1 || (N.N1 = {}));
(function(N1) {
(function(E2) {
E2[E2["f"] = 6] = "f";
})(N1.E2 || (N1.E2 = {}));
})(N.N1 || (N.N1 = {}));
(function(N2) {
let E3 = /*#__PURE__*/ function(E3) {
E3[E3["g"] = 7] = "g";
return E3;
}({});
})(N2 || (N2 = {}));
var N2;
})(N || (N = {}));
(function(N1) {
(function(E2) {
E2[E2["e"] = 5] = "e";
})(N1.E2 || (N1.E2 = {}));
})(N1 || (N1 = {}));
(function(N1) {
(function(E2) {
E2[E2["f"] = 6] = "f";
})(N1.E2 || (N1.E2 = {}));
})(N1 || (N1 = {}));
export var N, N1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/1/input.ts | TypeScript | namespace X1 {
console.log(1);
}
export namespace X2 {
console.log(2);
}
namespace X3 {
namespace X4 {
console.log(4);
}
}
namespace X5 {
export namespace X6 {
console.log(6);
}
}
namespace X7.X8 {
console.log(8);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/1/output.js | JavaScript | (function(X1) {
console.log(1);
})(X1 || (X1 = {}));
(function(X2) {
console.log(2);
})(X2 || (X2 = {}));
(function(X3) {
(function(X4) {
console.log(4);
})(X4 || (X4 = {}));
var X4;
})(X3 || (X3 = {}));
(function(X5) {
(function(X6) {
console.log(6);
})(X5.X6 || (X5.X6 = {}));
})(X5 || (X5 = {}));
(function(X7) {
(function(X8) {
console.log(8);
})(X7.X8 || (X7.X8 = {}));
})(X7 || (X7 = {}));
var X1, X3, X5, X7;
export var X2;
| 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.