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/tests/tsc-references/typeOfThisInStaticMembers7(target=esnext).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers7.ts]
class C {
static{
this.a = 1;
}
static{
this.b = this.a + 1;
}
}
class D extends C {
static{
this.c = 2;
}
static{
this.d = this.c + 1;
}
static{
this.e = 1 + super.a + (this.c + 1) + 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers7(target=esnext).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers7.ts]
class C {
static{
this.a = 1;
}
static{
this.b = this.a + 1;
}
}
class D extends C {
static{
this.c = 2;
}
static{
this.d = this.c + 1;
}
static{
this.e = 1 + super.a + (this.c + 1) + 1;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es2015).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
}
C.f = 1;
C.arrowFunctionBoundary = ()=>C.f + 1;
C.functionExprBoundary = function() {
return this.f + 2;
};
C.classExprBoundary = class {
constructor(){
this.a = this.f + 3;
}
};
C.functionAndClassDeclBoundary = (()=>{
function foo() {
ret... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es2015).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
}
C.f = 1, C.arrowFunctionBoundary = ()=>C.f + 1, C.functionExprBoundary = function() {
return this.f + 2;
}, C.classExprBoundary = class {
constructor(){
this.a = this.f + 3;
}
}, C.functionAndClassDeclBoundary = void 0;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es2022).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
static{
this.f = 1;
}
static{
this.arrowFunctionBoundary = ()=>this.f + 1;
}
static{
this.functionExprBoundary = function() {
return this.f + 2;
};
}
static{
this.classExprBoundary = class {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es2022).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
static{
this.f = 1;
}
static{
this.arrowFunctionBoundary = ()=>this.f + 1;
}
static{
this.functionExprBoundary = function() {
return this.f + 2;
};
}
static{
this.classExprBoundary = class {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es5).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = function C() {
"use strict";
_class_call_check(this, C);
};
C.f = 1;
C.arrowFunctionBoundary = function() {
return C.f + 1;
};
C.functionExprBoundary = function() {
return this.f + 2;
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=es5).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = function C() {
_class_call_check(this, C);
};
C.f = 1, C.arrowFunctionBoundary = function() {
return C.f + 1;
}, C.functionExprBoundary = function() {
return this.f + 2;
}, C.classExprBoun... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=esnext).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
static{
this.f = 1;
}
static{
this.arrowFunctionBoundary = ()=>this.f + 1;
}
static{
this.functionExprBoundary = function() {
return this.f + 2;
};
}
static{
this.classExprBoundary = class {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers8(target=esnext).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers8.ts]
class C {
static{
this.f = 1;
}
static{
this.arrowFunctionBoundary = ()=>this.f + 1;
}
static{
this.functionExprBoundary = function() {
return this.f + 2;
};
}
static{
this.classExprBoundary = class {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es2015).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
class C {
}
C.f = 1;
class D extends C {
}
D.arrowFunctionBoundary = ()=>_get(_get_prototype_of(D), "f", D) + 1;
D.functionExprBoundary = function() {
retu... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es2015).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
class C {
}
C.f = 1;
class D extends C {
}
D.arrowFunctionBoundary = ()=>_get(_get_prototype_of(D), "f", D) + 1, D.functionExprBoundary = function() {
retu... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es2022).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
class C {
static{
this.f = 1;
}
}
class D extends C {
static{
this.arrowFunctionBoundary = ()=>super.f + 1;
}
static{
this.functionExprBoundary = function() {
return super.f + 2;
};
}
static{
this.classE... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es2022).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
class C {
static{
this.f = 1;
}
}
class D extends C {
static{
this.arrowFunctionBoundary = ()=>super.f + 1;
}
static{
this.functionExprBoundary = function() {
return super.f + 2;
};
}
static{
this.classE... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es5).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inheri... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=es5).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inheri... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=esnext).1.normal.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
class C {
static{
this.f = 1;
}
}
class D extends C {
static{
this.arrowFunctionBoundary = ()=>super.f + 1;
}
static{
this.functionExprBoundary = function() {
return super.f + 2;
};
}
static{
this.classE... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInStaticMembers9(target=esnext).2.minified.js | JavaScript | //// [typeOfThisInStaticMembers9.ts]
class C {
static{
this.f = 1;
}
}
class D extends C {
static{
this.arrowFunctionBoundary = ()=>super.f + 1;
}
static{
this.functionExprBoundary = function() {
return super.f + 2;
};
}
static{
this.classE... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.1.normal.js | JavaScript | //// [typeOfThisInstanceMemberNarrowedWithLoopAntecedent.ts]
// #31995
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var SomeClass = /*#__PURE__*/ function() {
"use strict";
function SomeClass() {
_class_call_check(this, SomeClass);
}
var _proto = SomeClass.prototype... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.2.minified.js | JavaScript | //// [typeOfThisInstanceMemberNarrowedWithLoopAntecedent.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge1.1.normal.js | JavaScript | //// [a.ts]
export { };
//// [b.ts]
//! x the name `A` is defined multiple times
//! ,-[1:1]
//! 1 | import { A } from "./a";
//! : |
//! : `-- previous definition of `A` here
//! 2 | const A = 0;
//! : |
//! : `-- `A` redefined here
//! 3 | export { A };
//! 4 |
//! ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge1.2.minified.js | JavaScript | //// [a.ts]
export { };
//// [b.ts]
//! x the name `A` is defined multiple times
//! ,-[1:1]
//! 1 | import { A } from "./a";
//! : |
//! : `-- previous definition of `A` here
//! 2 | const A = 0;
//! : |
//! : `-- `A` redefined here
//! 3 | export { A };
//! 4 |
//! ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge2.1.normal.js | JavaScript | //// [a.ts]
var A = {};
export { A };
//// [b.ts]
export { };
//// [c.ts]
import { A } from "./b";
//// [d.ts]
import { A } from "./c";
A;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge2.2.minified.js | JavaScript | //// [a.ts]
var A = {};
export { A };
//// [b.ts]
export { };
//// [c.ts]
import "./b";
//// [d.ts]
import { A } from "./c";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge3.1.normal.js | JavaScript | //// [a.ts]
function A() {}
export { };
//// [b.ts]
(function(A) {
A.displayName = "A";
})(A || (A = {}));
export { A };
var A;
//// [c.ts]
import { A } from "./b";
A;
A.displayName;
A();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeOnlyMerge3.2.minified.js | JavaScript | //// [a.ts]
export { };
//// [b.ts]
var A;
(A || (A = {})).displayName = "A";
export { A };
//// [c.ts]
import { A } from "./b";
A.displayName, A();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsBaseType.1.normal.js | JavaScript | //// [typeParameterAsBaseType.ts]
// type parameters cannot be used as base types
// these are all errors
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
var C = /*#__PURE... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsBaseType.2.minified.js | JavaScript | //// [typeParameterAsBaseType.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
/*#__PURE__*/ T, /*#__PURE__*/ U;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeArgument.1.normal.js | JavaScript | //// [typeParameterAsTypeArgument.ts]
// These are all errors because type parameters cannot reference other type parameters from the same list
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
function foo(x, y) {
foo(y, y);
return new C();
}
var C = function C() {
"use strict";
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeArgument.2.minified.js | JavaScript | //// [typeParameterAsTypeArgument.ts]
import "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraint.1.normal.js | JavaScript | //// [typeParameterAsTypeParameterConstraint.ts]
// using a type parameter as a constraint for a type parameter is valid
// no errors expected except illegal constraints
function foo(x, y) {
return y;
}
var r = foo(1, 2);
var r = foo({}, 1);
var a;
var b;
var r2 = foo(a, b);
var r3 = foo({
x: 1
}, {
x: 2,
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraint.2.minified.js | JavaScript | //// [typeParameterAsTypeParameterConstraint.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraint2.1.normal.js | JavaScript | //// [typeParameterAsTypeParameterConstraint2.ts]
// using a type parameter as a constraint for a type parameter is invalid
// these should be errors unless otherwise noted
function foo(x, y) {
return y;
} // this is now an error
foo(1, '');
foo(1, {});
var n;
var r3 = foo(1, n);
function foo2(x, y) {
return y;... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraint2.2.minified.js | JavaScript | //// [typeParameterAsTypeParameterConstraint2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraintTransitively.1.normal.js | JavaScript | //// [typeParameterAsTypeParameterConstraintTransitively.ts]
// using a type parameter as a constraint for a type parameter is valid
// no errors expected
var a;
var b;
var c;
function foo(x, y, z) {
return z;
}
//function foo<T, U extends T, V extends U>(x: T, y: U, z: V): V { return z; }
foo(1, 2, 3);
foo({
x... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraintTransitively.2.minified.js | JavaScript | //// [typeParameterAsTypeParameterConstraintTransitively.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraintTransitively2.1.normal.js | JavaScript | //// [typeParameterAsTypeParameterConstraintTransitively2.ts]
// using a type parameter as a constraint for a type parameter is invalid
// these should be errors at the type parameter constraint declarations, and have no downstream errors
var a;
var b;
var c;
function foo(x, y, z) {
return z;
}
//function foo<T, U ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAsTypeParameterConstraintTransitively2.2.minified.js | JavaScript | //// [typeParameterAsTypeParameterConstraintTransitively2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability.1.normal.js | JavaScript | //// [typeParameterAssignability.ts]
// type parameters are not assignable to one another unless directly or indirectly constrained to one another
function foo(t, u) {
t = u; // error
u = t; // error
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability.2.minified.js | JavaScript | //// [typeParameterAssignability.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability2.1.normal.js | JavaScript | //// [typeParameterAssignability2.ts]
// type parameters are not assignable to one another unless directly or indirectly constrained to one another
function foo(t, u) {
t = u; // error
u = t; // ok
}
function foo2(t, u) {
t = u; // error
u = t; // ok
}
function foo3(t, u, v) {
t = u; // error
u ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability2.2.minified.js | JavaScript | //// [typeParameterAssignability2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability3.1.normal.js | JavaScript | //// [typeParameterAssignability3.ts]
// type parameters are not assignable to one another unless directly or indirectly constrained to one another
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var Foo = function Foo() {
"use strict";
_class_call_check(this, Foo);
};
function foo(t,... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterAssignability3.2.minified.js | JavaScript | //// [typeParameterAssignability3.ts]
import "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterConstModifiersReverseMappedTypes.1.normal.js | JavaScript | //// [typeParameterConstModifiersReverseMappedTypes.ts]
var result1 = test1({
prop: "foo",
nested: {
nestedProp: "bar"
}
});
var result2 = test2({
prop: "foo",
nested: {
nestedProp: "bar"
}
});
var result3 = test3({
prop: "foo",
nested: {
nestedProp: "bar"
}
}... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterConstModifiersReverseMappedTypes.2.minified.js | JavaScript | //// [typeParameterConstModifiersReverseMappedTypes.ts]
test1({
prop: "foo",
nested: {
nestedProp: "bar"
}
}), test2({
prop: "foo",
nested: {
nestedProp: "bar"
}
}), test3({
prop: "foo",
nested: {
nestedProp: "bar"
}
}), test4([
"1",
2
]), test5({
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterConstModifiersWithIntersection.1.normal.js | JavaScript | //// [typeParameterConstModifiersWithIntersection.ts]
// https://github.com/microsoft/TypeScript/issues/55778
var result = test({
produceThing: {},
useIt: {
type: "foo"
},
extra: 10
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterConstModifiersWithIntersection.2.minified.js | JavaScript | //// [typeParameterConstModifiersWithIntersection.ts]
test({
produceThing: {},
useIt: {
type: "foo"
},
extra: 10
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterDirectlyConstrainedToItself.1.normal.js | JavaScript | //// [typeParameterDirectlyConstrainedToItself.ts]
// all of the below should be errors
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = function C() {
"use strict";
_class_call_check(this, C);
};
var C2 = function C2() {
"use strict";
_class_call_check(this, C2);
};
fu... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterDirectlyConstrainedToItself.2.minified.js | JavaScript | //// [typeParameterDirectlyConstrainedToItself.ts]
import "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterExtendsUnionConstraintDistributed.1.normal.js | JavaScript | //// [typeParameterExtendsUnionConstraintDistributed.ts]
function f(a) {
return a;
} // Shouldn't error
function f2(ab) {
return ab;
} // Also shouldn't error
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterExtendsUnionConstraintDistributed.2.minified.js | JavaScript | //// [typeParameterExtendsUnionConstraintDistributed.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterIndirectlyConstrainedToItself.1.normal.js | JavaScript | //// [typeParameterIndirectlyConstrainedToItself.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = function C() {
"use strict";
_class_call_check(this, C);
};
var C2 = function C2() {
"use strict";
_class_call_check(this, C2);
};
function f() {}
function f2() {}
var ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterIndirectlyConstrainedToItself.2.minified.js | JavaScript | //// [typeParameterIndirectlyConstrainedToItself.ts]
import "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsConstraint.1.normal.js | JavaScript | //// [typeParameterUsedAsConstraint.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = function C() {
"use strict";
_class_call_check(this, C);
};
var C2 = function C2() {
"use strict";
_class_call_check(this, C2);
};
var C3 = function C3() {
"use strict";
_cl... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsConstraint.2.minified.js | JavaScript | //// [typeParameterUsedAsConstraint.ts]
import "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint.1.normal.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint.ts]
// Type parameters are in scope in their own and other type parameter lists
function foo(x, y) {
x = y;
return y;
}
function foo2(x, y) {
x = y;
return y;
}
var f = function f(x, y) {
x = y;
return y;
};
var f2 = function f2(x, y) {
x = y;... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint.2.minified.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint2.1.normal.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint2.ts]
// Type parameters are in scope in their own and other type parameter lists
// Nested local functions
function foo(x, y) {
function bar() {
function baz(a, b) {
x = y;
return y;
}
}
}
function foo2(x, y) {
function... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint2.2.minified.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint3.1.normal.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint3.ts]
// Type parameters are in scope in their own and other type parameter lists
// Object types
//class C<T, U extends T, V extends U> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T {
// var r: T;
// return x;
// }
//}
//class C2<... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint3.2.minified.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint3.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint4.1.normal.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint4.ts]
// Type parameters are in scope in their own and other type parameter lists
// Some negative cases
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = /*#__PURE__*/ function() {
"use strict";
function C() {
_class_call_... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParameterUsedAsTypeParameterConstraint4.2.minified.js | JavaScript | //// [typeParameterUsedAsTypeParameterConstraint4.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAreIdenticalToThemselves.1.normal.js | JavaScript | //// [typeParametersAreIdenticalToThemselves.ts]
// type parameters from the same declaration are identical to themself
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
function foo1(x) {}
function foo2(x) {}
function foo3(x, y) {
function inner(x) {}
function inner2(x) {}
}
var C = /*... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAreIdenticalToThemselves.2.minified.js | JavaScript | //// [typeParametersAreIdenticalToThemselves.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope.1.normal.js | JavaScript | //// [typeParametersAvailableInNestedScope.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var C = /*#__PURE__*/ function() {
"use strict";
function C() {
_class_call_check(this, C);
this.x = function(a) {
var y;
return y;
};
}
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope.2.minified.js | JavaScript | //// [typeParametersAvailableInNestedScope.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var c = new (/*#__PURE__*/ function() {
function C() {
_class_call_check(this, C), this.x = function(a) {};
}
return C.prototype.foo = function() {}, C;
}())();
c.data = c.x(null... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope2.1.normal.js | JavaScript | //// [typeParametersAvailableInNestedScope2.ts]
function foo(x, y) {
function bar(z) {
function baz(a) {
var c;
var d;
var e;
}
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope2.2.minified.js | JavaScript | //// [typeParametersAvailableInNestedScope2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope3.1.normal.js | JavaScript | //// [typeParametersAvailableInNestedScope3.ts]
function foo(v) {
function a(a) {
return a;
}
function b() {
return v;
}
function c(v) {
function a(a) {
return a;
}
function b() {
return v;
}
return {
a: a,
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeParametersAvailableInNestedScope3.2.minified.js | JavaScript | //// [typeParametersAvailableInNestedScope3.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typePredicateASI.1.normal.js | JavaScript | //// [typePredicateASI.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typePredicateASI.2.minified.js | JavaScript | //// [typePredicateASI.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQuery.1.normal.js | JavaScript | //// [/a.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
export var A = function A() {
"use strict";
_class_call_check(this, A);
};
//// [/b.ts]
var AConstructor;
export { };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQuery.2.minified.js | JavaScript | //// [/a.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
export var A = function A() {
_class_call_check(this, A);
};
//// [/b.ts]
export { };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQueryOnClass.1.normal.js | JavaScript | //// [typeQueryOnClass.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _create_class } from "@swc/helpers/_/_create_class";
var C = /*#__PURE__*/ function() {
"use strict";
function C(x) {
var _this = this;
_class_call_check(this, C);
this.x =... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQueryOnClass.2.minified.js | JavaScript | //// [typeQueryOnClass.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _create_class } from "@swc/helpers/_/_create_class";
var C = /*#__PURE__*/ function() {
function C(x) {
var _this = this;
_class_call_check(this, C), this.x = x, this.ia = 1, this.ib =... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQueryWithReservedWords.1.normal.js | JavaScript | //// [typeQueryWithReservedWords.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
var Controller = /*#__PURE__*/ function() {
"use strict";
function Controller() {
_class_call_check(this, Controller);
}
var _proto = Controller.prototype;
_proto.create = function... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeQueryWithReservedWords.2.minified.js | JavaScript | //// [typeQueryWithReservedWords.ts]
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeRelationships.1.normal.js | JavaScript | //// [typeRelationships.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
var C = /*#__PURE__*/ function() {
"use strict";
function C() {
_class_call_che... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeRelationships.2.minified.js | JavaScript | //// [typeRelationships.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_asConstArrays.1.normal.js | JavaScript | //// [typeSatisfaction_asConstArrays.ts]
// with readonly array
var arr1 = [
1,
2,
3
];
// with mutable array
var arr2 = [
1,
2,
3
];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_asConstArrays.2.minified.js | JavaScript | //// [typeSatisfaction_asConstArrays.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping1.1.normal.js | JavaScript | //// [typeSatisfaction_contextualTyping1.ts]
var p = {
isEven: function(n) {
return n % 2 === 0;
},
isOdd: function(n) {
return n % 2 === 1;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping1.2.minified.js | JavaScript | //// [typeSatisfaction_contextualTyping1.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping2.1.normal.js | JavaScript | //// [typeSatisfaction_contextualTyping2.ts]
var obj = {
f: function f(s) {},
g: function g(s) {}
};
// This needs to not crash (outer node is not expression)
({
f: function f(x) {}
});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping2.2.minified.js | JavaScript | //// [typeSatisfaction_contextualTyping2.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping3.1.normal.js | JavaScript | //// [typeSatisfaction_contextualTyping3.ts]
// see https://github.com/microsoft/TypeScript/issues/53920#issuecomment-1516616255
var obj = {
foo: function() {
var param = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "default";
return param;
}
};
var obj2 = {
foo: function... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_contextualTyping3.2.minified.js | JavaScript | //// [typeSatisfaction_contextualTyping3.ts]
var fn = function() {
return arguments.length > 0 && void 0 !== arguments[0] && arguments[0], null;
};
fn(), fn(32);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_ensureInterfaceImpl.1.normal.js | JavaScript | //// [typeSatisfaction_ensureInterfaceImpl.ts]
var car = {
start: function start() {},
move: function move(d) {
// d should be number
},
stop: function stop() {}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_ensureInterfaceImpl.2.minified.js | JavaScript | //// [typeSatisfaction_ensureInterfaceImpl.ts]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_js.1.normal.js | JavaScript | //// [/src/a.js]
var v = undefined;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_js.2.minified.js | JavaScript | //// [/src/a.js]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_optionalMemberConformance.1.normal.js | JavaScript | //// [typeSatisfaction_optionalMemberConformance.ts]
// Undesirable behavior today with type annotation
var a = {
x: 10
};
// Should OK
console.log(a.x.toFixed());
// Should error
var p = a.y;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_optionalMemberConformance.2.minified.js | JavaScript | //// [typeSatisfaction_optionalMemberConformance.ts]
var a = {
x: 10
};
console.log(a.x.toFixed()), a.y;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_propNameConstraining.1.normal.js | JavaScript | //// [typeSatisfaction_propNameConstraining.ts]
var p = {
a: 0,
b: "hello",
x: 8 // Should error, 'x' isn't in 'Keys'
};
// Should be OK -- retain info that a is number and b is string
var a = p.a.toFixed();
var b = p.b.substring(1);
// Should error even though 'd' is in 'Keys'
var d = p.d;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_propNameConstraining.2.minified.js | JavaScript | //// [typeSatisfaction_propNameConstraining.ts]
var p = {
a: 0,
b: "hello",
x: 8
};
p.a.toFixed(), p.b.substring(1), p.d;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_propertyNameFulfillment.1.normal.js | JavaScript | //// [typeSatisfaction_propertyNameFulfillment.ts]
var p = {
a: 0,
b: "hello",
x: 8 // Should error, 'x' isn't in 'Keys'
};
// Should be OK -- retain info that a is number and b is string
var a = p.a.toFixed();
var b = p.b.substring(1);
// Should error even though 'd' is in 'Keys'
var d = p.d;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc/tests/tsc-references/typeSatisfaction_propertyNameFulfillment.2.minified.js | JavaScript | //// [typeSatisfaction_propertyNameFulfillment.ts]
var p = {
a: 0,
b: "hello",
x: 8
};
p.a.toFixed(), p.b.substring(1), p.d;
| 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.