file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_ecma_parser/tests/tsc/parserSymbolIndexer3.ts | TypeScript | //@target: ES6
class C {
static [s: symbol]: string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolIndexer4.ts | TypeScript | //@target: ES6
var x: {
[s: symbol]: string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty1.ts | TypeScript | //@target: ES6
interface I {
[Symbol.iterator]: string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty2.ts | TypeScript | //@target: ES6
interface I {
[Symbol.unscopables](): string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty3.ts | TypeScript | //@target: ES6
declare class C {
[Symbol.unscopables](): string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty4.ts | TypeScript | //@target: ES6
declare class C {
[Symbol.toPrimitive]: string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty5.ts | TypeScript | //@target: ES6
class C {
[Symbol.toPrimitive]: string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty6.ts | TypeScript | //@target: ES6
class C {
[Symbol.toStringTag]: string = "";
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty7.ts | TypeScript | //@target: ES6
class C {
[Symbol.toStringTag](): void { }
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty8.ts | TypeScript | //@target: ES6
var x: {
[Symbol.toPrimitive](): string
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSymbolProperty9.ts | TypeScript | //@target: ES6
var x: {
[Symbol.toPrimitive]: string
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserSyntaxWalker.generated.ts | TypeScript | //declare module "fs" {
// export class File {
// constructor(filename: string);
// public ReadAllText(): string;
// }
// export interface IFile {
// [index: number]: string;
// }
//}
//import fs = module("fs");
//module TypeScriptAllInOne {
// export class Program {
// st... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTernaryAndCommaOperators1.ts | TypeScript | b.src ? 1 : 2, c && d;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery1.ts | TypeScript | var v: typeof A | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery2.ts | TypeScript | var v: typeof A; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery5.ts | TypeScript | var v: typeof A.B | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery6.ts | TypeScript | var v: typeof A.B; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery7.ts | TypeScript | var v: typeof A[] | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery8.ts | TypeScript | var v: typeof A<B> | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserTypeQuery9.ts | TypeScript | var s: typeof A[];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnaryExpression1.ts | TypeScript | ++this; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnaryExpression2.ts | TypeScript | ++function(e) { } | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnaryExpression3.ts | TypeScript | ++[0]; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnaryExpression4.ts | TypeScript | ++{}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnaryExpression7.ts | TypeScript | ++ new Foo(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnicode1.ts | TypeScript | try {
var \u0078x = 6;
if (xx !== 6) {
$ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx));
}
}
catch (e) {
$ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx));
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnicode2.ts | TypeScript | var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = 1; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnicode3.ts | TypeScript | class 剩下 {
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUnicodeWhitespaceCharacter1.ts | TypeScript | function foo(){ }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserUsingConstructorAsIdentifier.ts | TypeScript | function define(constructor, instanceMembers, staticMembers) {
constructor = constructor || function () { };
PluginUtilities.Utilities.markSupportedForProcessing(constructor);
if (instanceMembers) {
initializeProperties(constructor.prototype, instanceMembers);... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration1.ts | TypeScript |
var selection = a,
position = b,
model = c,
support = d; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration11.ts | TypeScript | var a,b; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration2.ts | TypeScript | (function() {
var check = function () {
}
var checkNot = function () {
}
MUnit.test(a);
})(); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration3.ts | TypeScript | function runTests() {
var outfile = new Harness.Compiler.WriterAggregator()
, outerr = new Harness.Compiler.WriterAggregator()
, compiler = <TypeScript.TypeScriptCompiler>new TypeScript.TypeScriptCompiler(outerr)
, code;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration4.d.ts | TypeScript | declare var v; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration7.ts | TypeScript | var a,b | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableDeclaration9.ts | TypeScript | var a; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableStatement1.ts | TypeScript | var a,
b,
c | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableStatement2.ts | TypeScript | var a
, b
, c | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableStatement3.ts | TypeScript | var
a,
b,
c | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVariableStatement4.ts | TypeScript | var
a
, b
, c | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserVoidExpression1.ts | TypeScript | void 0; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserWithStatement2.ts | TypeScript | with (1)
return; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserX_ArrowFunction4.ts | TypeScript | var v = (a, b) => {
}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakInIterationOrSwitchStatement1.ts | TypeScript | while (true) {
break;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakInIterationOrSwitchStatement2.ts | TypeScript | do {
break;
}
while (true); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakInIterationOrSwitchStatement3.ts | TypeScript | for (;;) {
break;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakInIterationOrSwitchStatement4.ts | TypeScript | for (var i in something) {
break;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakTarget1.ts | TypeScript | target:
break target; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakTarget2.ts | TypeScript | target:
while (true) {
break target;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakTarget3.ts | TypeScript | // @allowUnusedLabels: true
target1:
target2:
while (true) {
break target1;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_breakTarget4.ts | TypeScript | // @allowUnusedLabels: true
target1:
target2:
while (true) {
break target2;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueInIterationStatement1.ts | TypeScript | while (true) {
continue;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueInIterationStatement2.ts | TypeScript | do {
continue;
}
while (true); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueInIterationStatement3.ts | TypeScript | for (;;) {
continue;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueInIterationStatement4.ts | TypeScript | for (var i in something) {
continue;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueLabel.ts | TypeScript | label1: for(var i = 0; i < 1; i++) {
continue label1;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueTarget2.ts | TypeScript | target:
while (true) {
continue target;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueTarget3.ts | TypeScript | // @allowUnusedLabels: true
target1:
target2:
while (true) {
continue target1;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_continueTarget4.ts | TypeScript | // @allowUnusedLabels: true
target1:
target2:
while (true) {
continue target2;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_duplicateLabel3.ts | TypeScript | // @allowUnusedLabels: true
target:
while (true) {
function f() {
target:
while (true) {
}
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parser_duplicateLabel4.ts | TypeScript | // @allowUnusedLabels: true
// @allowUnreachableCode: true
target:
while (true) {
}
target:
while (true) {
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parserindenter.ts | TypeScript | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parservoidInQualifiedName0.ts | TypeScript | var v : void; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/parservoidInQualifiedName2.ts | TypeScript | var v : x.void; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.ts | TypeScript | class C {
test: string
}
class D extends C {
test2: string
}
declare function testError<T extends C>(a: (t: T, t1: T) => void): T
// more args
testError((t1: D, t2, t3) => {})
testError((t1, t2: D, t3) => {})
testError((t1, t2, t3: D) => {})
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.ts | TypeScript | class C {
test: string
}
class D extends C {
test2: string
}
declare function test<T extends C>(a: (t: T, t1: T) => void): T
declare function testRest<T extends C>(a: (t: T, t1: T, ...ts: T[]) => void): T
// exactly
test((t1: D, t2) => { t2.test2 })
test((t1, t2: D) => { t2.test2 })
// zero arg
test(() => {})... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionWitoutTypeParameter.ts | TypeScript | // @noImplicitAny: true
// simple case
declare function simple(f: (a: number, b: number) => void): {}
simple((a: number, b) => {})
simple((a, b: number) => {})
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.ts | TypeScript | type NamedAndAnonymous = [a: string, number];
function fa1(...args: NamedAndAnonymous) {}
function fa2(a: NamedAndAnonymous, ...args: NamedAndAnonymous) {}
type NamedAnonymousMixed = [a: string, number, c: number, NamedAndAnonymous];
function fb1(...args: NamedAnonymousMixed) {}
function fb2(a: NamedAnonymousMixed, ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples2.ts | TypeScript | // @strict: true
// @lib: esnext
// https://github.com/microsoft/TypeScript/issues/55693
interface MultiKeyMap<Keys extends readonly unknown[], Value> {
get<Key extends GetKeys<Keys>>(...key: Key): GetResult<Keys, Key, Value>;
}
type GetKeys<Keys extends readonly unknown[]> = Keys extends [
...infer Remain,
infe... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples3.ts | TypeScript | // @strict: true
// @lib: esnext
declare const tuple: [number, name: string, boolean, value: number, string];
const output = ((...args) => args)(...tuple);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSGrammarErrors2.ts | TypeScript | // @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors2.js
// @filename: /a.js
export default 1;
// @filename: /b.js
/**
* @deprecated
*/
export { default as A } from "./a";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSGrammarErrors4.ts | TypeScript | // @outdir: out/
// @target: esnext
// @module: esnext
// @allowJs: true
// @filename: plainJSGrammarErrors4.js
class A {
#a;
m() {
this.#a; // ok
this.#b; // error
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSRedeclare.ts | TypeScript | // @outdir: out/
// @allowJS: true
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSRedeclare2.ts | TypeScript | // @outdir: out/
// @allowJS: true
// @checkJS: true
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSRedeclare3.ts | TypeScript | // @outdir: out/
// @allowJS: true
// @checkJS: false
// @filename: plainJSRedeclare.js
const orbitol = 1
var orbitol = 1 + false
orbitol.toExponential()
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plainJSTypeErrors.ts | TypeScript | // @outdir: out/
// @target: esnext
// @allowJS: true
// @filename: plainJSTypeErrors.js
// should error
if ({} === {}) {}
// should not error
if ({} == {}) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plusOperatorWithBooleanType.ts | TypeScript | // + operator on boolean type
var BOOLEAN: boolean;
function foo(): boolean { return true; }
class A {
public a: boolean;
static foo() { return false; }
}
module M {
export var n: boolean;
}
var objA = new A();
// boolean type var
var ResultIsNumber1 = +BOOLEAN;
// boolean type literal
var ResultIsNumb... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plusOperatorWithEnumType.ts | TypeScript | // + operator on enum type
enum ENUM { };
enum ENUM1 { A, B, "" };
// enum type var
var ResultIsNumber1 = +ENUM;
var ResultIsNumber2 = +ENUM1;
// enum type expressions
var ResultIsNumber3 = +ENUM1["A"];
var ResultIsNumber4 = +(ENUM[0] + ENUM1["B"]);
// miss assignment operators
+ENUM;
+ENUM1;
+ENUM1.B;
+ENUM, ENUM1... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plusOperatorWithNumberType.ts | TypeScript | // + operator on number type
var NUMBER: number;
var NUMBER1: number[] = [1, 2];
function foo(): number { return 1; }
class A {
public a: number;
static foo() { return 1; }
}
module M {
export var n: number;
}
var objA = new A();
// number type var
var ResultIsNumber1 = +NUMBER;
var ResultIsNumber2 = +N... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/plusOperatorWithStringType.ts | TypeScript | // + operator on string type
var STRING: string;
var STRING1: string[] = ["", "abc"];
function foo(): string { return "abc"; }
class A {
public a: string;
static foo() { return ""; }
}
module M {
export var n: string;
}
var objA = new A();
// string type var
var ResultIsNumber1 = +STRING;
var ResultIsNu... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/preserveValueImports.ts | TypeScript | // @preserveValueImports: true
// @isolatedModules: true,false
// @module: esnext
// @Filename: a.ts
export default {};
export const b = 0;
export const c = 1;
export interface D {}
// @Filename: b.ts
import a, { b, c, D } from "./a";
// @Filename: c.ts
import * as a from "./a";
// @Filename: d.ts
export = {};
// ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/preserveValueImports_errors.ts | TypeScript | // @preserveValueImports: true
// @isolatedModules: true,false
// @module: esnext
// @Filename: a.ts
export type A = {};
export type { A as default };
// @Filename: b.ts
class B {};
export type { B, B as default };
// @Filename: c.ts
import DefaultA from "./a";
import { A } from "./a";
import DefaultB from "./b";
im... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/preserveValueImports_importsNotUsedAsValues.ts | TypeScript | // @preserveValueImports: true
// @importsNotUsedAsValues: preserve
// @module: esnext
// @Filename: /mod.ts
export type A = unknown;
export type B = never;
export type C = any;
// @Filename: /index.ts
import { type A, type B, type C } from "./mod.js";
// @Filename: /reexport.ts
export { type A, type B, type C } fro... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/preserveValueImports_mixedImports.ts | TypeScript | // @preserveValueImports: true
// @isolatedModules: true
// @module: es2015
// @Filename: /exports.ts
export function Component() {}
export interface ComponentProps {}
// @Filename: /index.ts
import { Component, ComponentProps } from "./exports.js";
// @Filename: /index.fixed.ts
import { Component, type ComponentPro... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/preserveValueImports_module.ts | TypeScript | // @preserveValueImports: true
// @module: amd,system,commonjs,es2015
// @noTypesAndSymbols: true
export {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/primtiveTypesAreIdentical.ts | TypeScript | // primitive types are identical to themselves so these overloads will all cause errors
function foo1(x: number);
function foo1(x: number);
function foo1(x: any) { }
function foo2(x: string);
function foo2(x: string);
function foo2(x: any) { }
function foo3(x: boolean);
function foo3(x: boolean);
function foo3(x: an... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateClassPropertyAccessibleWithinClass.ts | TypeScript | // no errors
class C {
private x: string;
private get y() { return this.x; }
private set y(x) { this.y = this.x; }
private foo() { return this.foo; }
private static x: string;
private static get y() { return this.x; }
private static set y(x) { this.y = this.x; }
private static foo() { ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateClassPropertyAccessibleWithinNestedClass.ts | TypeScript | // @target: ES5
// no errors
class C {
private x: string;
private get y() { return this.x; }
private set y(x) { this.y = this.x; }
private foo() { return this.foo; }
private static x: string;
private static get y() { return this.x; }
private static set y(x) { this.y = this.x; }
private... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateConstructorFunction.ts | TypeScript | // @allowjs: true
// @checkjs: true
// @outdir: salsa
// @declaration: true
// @filename: privateConstructorFunction.js
{
// make sure not to crash when parent's a block rather than a source file or some other
// symbol-having node.
/** @private */
function C() {
this.x = 1
}
new C()
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateIdentifierExpando.ts | TypeScript | // @allowJs: true
// @checkJs: true
// @declaration: true
// @emitDeclarationOnly: true
// @Filename: privateIdentifierExpando.js
const x = {};
x.#bar.baz = 20;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAccessors.ts | TypeScript | // @strict: true
// @target: es6
class A1 {
get #prop() { return ""; }
set #prop(param: string) { }
get #roProp() { return ""; }
constructor(name: string) {
this.#prop = "";
this.#roProp = ""; // Error
console.log(this.#prop);
console.log(this.#roProp);
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAccessorsCallExpression.ts | TypeScript | // @target: es2015
class A {
get #fieldFunc() { return function() { this.x = 10; } }
get #fieldFunc2() { return function(a, ...b) {}; }
x = 1;
test() {
this.#fieldFunc();
const func = this.#fieldFunc;
func();
new this.#fieldFunc();
const arr = [ 1, 2 ];
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAmbientNoImplicitAny.ts | TypeScript | // @noImplicitAny: true
// @target: ESNext
declare class A {
#prop;
}
class B {
#prop;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAndAny.ts | TypeScript | // @strict: true
// @target: es6
class A {
#foo = true;
static #baz = 10;
static #m() {}
method(thing: any) {
thing.#foo; // OK
thing.#m();
thing.#baz;
thing.#bar; // Error
thing.#foo();
}
methodU(thing: unknown) {
thing.#foo;
thing.#m();
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAndIndexSignature.ts | TypeScript | // @strict: true
// @target: es6
class A {
[k: string]: any;
#foo = 3;
["#bar"] = this["#bar"] // Error (private identifiers should not prevent circularity checking for computeds)
constructor(message: string) {
this.#f = 3 // Error (index signatures do not implicitly declare private... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAndObjectRestSpread.ts | TypeScript | // @strict: true
// @target: es6
class C {
#prop = 1;
static #propStatic = 1;
method(other: C) {
const obj = { ...other };
obj.#prop;
const { ...rest } = other;
rest.#prop;
const statics = { ... C};
statics.#propStatic
const { ...sRest } = C;
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameAndStaticInitializer.ts | TypeScript | // @target: esnext, es2022, es2015
class A {
#foo = 1;
static inst = new A();
#prop = 2;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameCircularReference.ts | TypeScript | // @strict: true
// @target: es6
class A {
#foo = this.#bar;
#bar = this.#foo;
["#baz"] = this["#baz"]; // Error (should *not* be private name error)
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/tsc/privateNameClassExpressionLoop.ts | TypeScript | // @target: es2015
const array = [];
for (let i = 0; i < 10; ++i) {
array.push(class C {
#myField = "hello";
#method() {}
get #accessor() { return 42; }
set #accessor(val) { }
});
}
| 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.