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/typescript-errors/type-lit/optional-getter/input.ts | TypeScript | export type A = {
get m?(): string;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts | TypeScript | export type A = {
set m?(val: string);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts | TypeScript | export type A = {
readonly get m(): string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts | TypeScript | export type A = {
readonly m(): string;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts | TypeScript | export type A = {
readonly set m(val: string);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-export-specifier/duplicated-type-only/input.ts | TypeScript | export type { type something }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-export-specifier/missing-as/input.ts | TypeScript | export { type foo bar }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-export-specifier/missing-local/input.ts | TypeScript | export { type foo as }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-export-specifier/redundant-tokens/input.ts | TypeScript | export { type foo as bar baz }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-export-specifier/too-many-as/input.ts | TypeScript | export { type as as as as }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-equals-decl/named/input.ts | TypeScript | import type { MyType } = require('commonjs-package')
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-equals-decl/namespace/input.ts | TypeScript | import type * as MyType = require('commonjs-package')
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/duplicated-type-only/input.ts | TypeScript | import type { type something } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/invalid-local/input.ts | TypeScript | import { type as export } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/invalid-type-only-local-with-imported/input.ts | TypeScript | import { type as as export } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/invalid-type-only/input.ts | TypeScript | import { type import } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/missing-as/input.ts | TypeScript | import { type foo bar } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/missing-local/input.ts | TypeScript | import { type foo as } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/redundant-tokens/input.ts | TypeScript | import { type foo as bar baz } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-only-import-specifier/too-many-as/input.ts | TypeScript | import { type as as as as } from 'mod'
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts | TypeScript | // @strict: true
declare function f1<const T>(x: T): T;
const x11 = f1('a');
const x12 = f1(['a', ['b', 'c']]);
const x13 = f1({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] });
declare function f2<const T, U>(x: T | undefined): T;
const x21 = f2('a');
const x22 = f2(['a', ['b', 'c']]);
const x23 = f2({ a: 1, b: "c"... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/types/tuple-optional-invalid/input.ts | TypeScript | let x: [string?, number]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/use-strict/arrow-fn-expr/input.ts | TypeScript | const f = ([x]: string) => { 'use strict' }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/use-strict/fn-block/input.ts | TypeScript | function f([x]: string) { 'use strict' }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/variable-declarator/definite-assignment-not-allowed/input.ts | TypeScript | let {}! = {}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript-errors/variance-annotations/1/input.ts | TypeScript | type Covariant<out T> = {
x: T;
}
declare let super_covariant: Covariant<unknown>;
declare let sub_covariant: Covariant<string>;
super_covariant = sub_covariant;
sub_covariant = super_covariant; // Error
type Contravariant<in T> = {
f: (x: T) => void;
}
declare let super_contravariant: Contravariant<unknow... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript.rs | Rust | #![allow(clippy::needless_update)]
use std::{
fs::File,
io::Read,
path::{Path, PathBuf},
};
use pretty_assertions::assert_eq;
use swc_common::{comments::SingleThreadedComments, FileName};
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, PResult, Parser, Syntax, TsSyntax};
use swc_ecma_visit::FoldW... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/amaro-194/input.ts | TypeScript | class Wrapper<Fn extends (...args: any[]) => any> {
#inner: Fn;
constructor(inner: Fn) {
this.#inner = inner;
}
wrap(x: unknown): ReturnType<Fn> {
return this.#inner(x);
}
}
async function main(): Promise<void> {
// The error happens here:
const promiseWrapper = new Wrapper<<T>(x: T) => Promise... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/annotated/input.ts | TypeScript | (x: number): number => x;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async-await-null/input.ts | TypeScript | async <T>() => await null;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic-false-positive/input.ts | TypeScript | async < 1;
async<T>() == 0;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts | TypeScript | async <T>(a: T): T => a;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async-param/input.ts | TypeScript | let fn1 = (async, x) => {};
let fn2 = (async = 1, x) => {};
let fn3 = (async?, x?) => {};
let fn4 = (async: any, x: any) => {};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async-rest/input.ts | TypeScript | async (...args: any[]) : any => {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/async/input.ts | TypeScript | async (x?: number): any => x;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/const-type-param/input.ts | TypeScript | export const fn = <const Data extends Type>(payload: Data) => payload;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/default-parameter-values/input.ts | TypeScript | (x: number = 0) => 0;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/destructuring/input.ts | TypeScript | ({ a = 0 }) => 0;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/generic-tsx/input.ts | TypeScript | // Same as `generic`. Verify that JSX doesn't change things.
<T>(a: T): T => a;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/generic/input.ts | TypeScript | <T>(a: T): T => a;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/inside-conditional-expr/input.ts | TypeScript | referrer ? false : ([, specifier]): string => specifier;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/optional-parameter/input.ts | TypeScript | (x?: number): any => x; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/arrow-function/predicate-types/input.ts | TypeScript | (x: any): x is string => true;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/case1/input.ts | TypeScript | class Foo {
declare a: string
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/as/input.ts | TypeScript | x as T;
x < y as boolean; // (x < y) as boolean;
x === 1 as number; // x === (1 as number);
x as any as T;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/assert-and-assign/input.ts | TypeScript | (a as number) = 42; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/false-positive/input.ts | TypeScript | f(x < 0, /a/);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/multiple-assert-and-assign/input.ts | TypeScript | (a as number as any) = 42; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/need-parentheses/input.ts | TypeScript | (<T> x).y;
(x as T).y;
x!.y;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-2/input.ts | TypeScript | x! / 2
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-3/input.ts | TypeScript | const x = foo()!;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-and-assign-2/input.ts | TypeScript | x! *= 1
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-and-assign/input.ts | TypeScript | x! += 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-false-positive/input.ts | TypeScript | a
!b
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion-then-property-access/input.ts | TypeScript | x!.y;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/null-assertion/input.ts | TypeScript | x!;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/type-assertion-after-operator/input.ts | TypeScript | 1 + <number> 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/type-assertion-and-assign/input.ts | TypeScript | (<number> x) += 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/type-assertion-before-operator/input.ts | TypeScript | <number> 1 + 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/cast/type-assertion/input.ts | TypeScript | <number> 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/abstract-false-positive/input.ts | TypeScript | // Exports an identifier, doesn't try parsing `abstract class`
export default abstract;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/abstract/input.ts | TypeScript | abstract class C {}
declare abstract class C {}
export abstract class C {}
// `export abstract class {}` is not valid TypeScript.
export default abstract class { }
export default abstract class C { }
// `abstract class` is not valid as an expression.
export abstract class C {
abstract prop: number;
abstract method... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/auto-accessor/input.ts | TypeScript | abstract class B {
abstract accessor i: number;
}
class C1 extends B {
accessor a: any;
accessor b = 1;
static accessor c: any;
static accessor d = 2;
public static accessor e = 4;
protected static accessor f: number;
private accessor g!: string;
public accessor h = 1;
public ove... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/constructor-with-modifier-names/input.ts | TypeScript | class Foo {
constructor(set, readonly) {}
constructor(set: any, readonly: boolean) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/constructor/input.ts | TypeScript | class C {
constructor(x: number, y: number);
constructor(x: string, y: string);
constructor(x: any, y: any) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/declare/input.ts | TypeScript | declare class C {
[x: string]: any;
x;
x: number;
f();
f(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/decorators/input.ts | TypeScript | @dec
class C {
constructor(@dec public param: string) {
}
@dec
@dec2
method() {}
@dec
prop;
@dec
get prop2() { return 5; }
@dec
static method() {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/expression-extends-implements/input.ts | TypeScript | (class extends f()<T> implements X.Y<T> {});
(class C extends f()<T> implements X.Y<T> {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/expression-extends/input.ts | TypeScript | (class extends f()<T> {});
(class C extends f()<T> {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/expression-generic/input.ts | TypeScript | (class<T> {});
(class C<T> {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/expression-implements/input.ts | TypeScript | (class implements X.Y<T> {});
(class C implements X.Y<T> {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/extends-implements/input.ts | TypeScript | class C extends f()<T> implements X.Y<T> {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/extends/input.ts | TypeScript | class C extends f()<T> {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/generic/input.ts | TypeScript | class C<T extends object = { x: number }> {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/get-generic/input.ts | TypeScript | declare class C {
get<T>(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/get-set-asi-issue/input.ts | TypeScript | class C {
get
x() { return 0 }
set
x(value) {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/implements/input.ts | TypeScript | class C implements X.Y<T> {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/index-signature/input.ts | TypeScript | class C {
[x: string]: any;
readonly [x: string]: any;
static [x: string]: any;
static readonly [x: string]: any;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/members-with-modifier-names/input.ts | TypeScript | class C {
public(): void;
public static(): void;
readonly = 0;
async<T>(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/members-with-reserved-names/input.ts | TypeScript | class C {
public delete(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-computed/input.ts | TypeScript | class C {
[Symbol.iterator](): void;
[Symbol.iterator]?(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts | TypeScript | class C {
f<T>(a: T, b?: T, ...c: T[]): T {}
[Symbol.iterator]<T>(): T {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-no-body/input.ts | TypeScript | class C {
f();
f(): void;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-optional/input.ts | TypeScript | class C {
m?(): void {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-return-type/input.ts | TypeScript | class C {
f(): void {}
g(): this is {} { return true; }
h(): asserts this is {} { throw ""; }
i(): asserts this { throw ""; }
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-with-newline-with-body/input.ts | TypeScript | class C
{
m()
{
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/method-with-newline-without-body/input.ts | TypeScript | class C
{
m()
n()
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/modifier-override/input.ts | TypeScript | class MyClass1 extends BaseClass {
override() {}
override show() {}
public override show() {}
override size = 5;
override readonly size = 5;
abstract override readonly size = 5;
private abstract override readonly size = 5;
static override show() {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/modifiers-accessors/input.ts | TypeScript | // Copy of modifiers-methods with 'get'
abstract class C {
abstract get a();
static get s() { return 0; }
public abstract get pua();
public static get pus() { return 0; }
public get pu() { return 0; }
protected get po() { return 0; }
private get pi() { return 0; }
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/modifiers-methods-async/input.ts | TypeScript | // Copy of modifiers-methods with 'async'
abstract class C {
abstract async a();
static async s() {}
public abstract async pua();
public static async pus() {}
public async pu() {}
protected async po() {}
private async pi() {}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/modifiers-properties/input.ts | TypeScript | abstract class C {
readonly r;
readonly r2?: number;
abstract a;
static s;
public pu;
protected po;
private pi;
readonly abstract ra;
abstract readonly ar;
static readonly sr;
public readonly pur;
public abstract pua;
public static pus;
public readonly abstract... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/override-parameter-property/input.ts | TypeScript | class C extends B {
constructor(override: Date)
constructor(override v: number)
constructor(public override v: string)
constructor(override readonly v: boolean)
constructor(arg: any) {
super()
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/override/input.ts | TypeScript | class C extends B {
override prop = 5;
override method() {
}
}
// even without an extends it should set is_override
class C {
override prop = 5;
override method() {
}
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/properties/input.ts | TypeScript | class C {
x;
x?;
x: number;
x: number = 1;
x!;
x!: number;
async: boolean;
static async: boolean;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/property-computed/input.ts | TypeScript | class C {
[Symbol.iterator]: number;
[Symbol.iterator]?: number;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/property-declare/input.ts | TypeScript | class MyClass {
declare hoge: string;
declare foo: number;
constructor() {
this.hoge = "test";
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/property-private/input.ts | TypeScript | class MyClass {
#a = 0;
#b: string;
constructor() {
this.#b = "test";
}
method() {
return #a in this;
}
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/class/static/input.ts | TypeScript | class C {
static f();
public static f();
protected static f();
private static f();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/const/no-initializer/input.ts | TypeScript | const x: number;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/custom/arrow/complex-tsc/input.ts | TypeScript | export const assertEachNode = shouldAssert(AssertionLevel.Normal)
? (nodes: Node[], test: (node: Node) => boolean, message?: string): void => assert(
test === undefined || every(nodes, test),
message || "Unexpected node.",
() => `Node array did not pass test '... | 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.