_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_12429_17844 | module Lanthanum {
export class suillus<T0, T1> {
spilosoma() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; }
tumbalensis() : caurinus.megaphyllus { var x : caurinus.megaphyllus; () => { var y = this; }; return x; }
anatolicus() : julianae.steerii { var x : ... | {
"end_byte": 17844,
"start_byte": 12429,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_17845_22416 | module rendalli {
export class zuluensis extends julianae.steerii {
telfairi() : argurus.wetmorei<Lanthanum.megalonyx, provocax.melanoleuca> { var x : argurus.wetmorei<Lanthanum.megalonyx, provocax.melanoleuca>; () => { var y = this; }; return x; }
keyensis() : quasiater.wattsi<quasiater.carolinensis, lavali.... | {
"end_byte": 22416,
"start_byte": 17845,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_22417_27196 | module trivirgatus {
export class tumidifrons<T0, T1> {
nivalis() : dogramacii.kaiseri { var x : dogramacii.kaiseri; () => { var y = this; }; return x; }
vestitus() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; }
aequatorius() : rionegrensis.caniventer { var x :... | {
"end_byte": 27196,
"start_byte": 22417,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_27199_30882 | export class oconnelli {
youngsoni() : nigra.thalia<patas.uralensis, julianae.galapagoensis> { var x : nigra.thalia<patas.uralensis, julianae.galapagoensis>; () => { var y = this; }; return x; }
terrestris() : macrorhinos.konganensis { var x : macrorhinos.konganensis; () => { var y = this; }; return x; }
ch... | {
"end_byte": 30882,
"start_byte": 27199,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_30883_34920 | module lavali {
export class wilsoni extends Lanthanum.nitidus<rionegrensis.caniventer, Lanthanum.jugularis> {
setiger() : nigra.thalia<patas.uralensis, wilsoni> { var x : nigra.thalia<patas.uralensis, wilsoni>; () => { var y = this; }; return x; }
lorentzii() : imperfecta.subspinosus { var x : imperfecta.sub... | {
"end_byte": 34920,
"start_byte": 30883,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_34923_39489 | export class xanthognathus {
nanulus() : daubentonii.nigricans<imperfecta.subspinosus, samarensis.pallidus> { var x : daubentonii.nigricans<imperfecta.subspinosus, samarensis.pallidus>; () => { var y = this; }; return x; }
albigena() : chrysaeolus.sarasinorum<caurinus.psilurus, quasiater.bobrinskoi> { var x : c... | {
"end_byte": 39489,
"start_byte": 34923,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_39490_44699 | module dogramacii {
export class robustulus extends lavali.wilsoni {
fossor() : minutus.inez<argurus.peninsulae, julianae.nudicaudus> { var x : minutus.inez<argurus.peninsulae, julianae.nudicaudus>; () => { var y = this; }; return x; }
humboldti() : sagitta.cinereus<lavali.xanthognathus, argurus.oreas> { var ... | {
"end_byte": 44699,
"start_byte": 39490,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_44700_49738 | module lutreolus {
export class schlegeli extends lavali.beisa {
mittendorfi() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; }
blicki() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; }
culionensis() : argurus.da... | {
"end_byte": 49738,
"start_byte": 44700,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_49739_54733 | module nigra {
export class dolichurus<T0, T1> {
solomonis() : panglima.abidi<quasiater.carolinensis, rendalli.crenulata<gabriellae.klossii<julianae.nudicaudus, dogramacii.aurata>, argurus.netscheri<minutus.inez<argurus.peninsulae, julianae.nudicaudus>, julianae.oralis<lavali.xanthognathus, argurus.oreas>>>> { va... | {
"end_byte": 54733,
"start_byte": 49739,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_54734_60232 | module quasiater {
export class carolinensis {
concinna(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; }
aeneus(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; }
aloysiisabaudiae(): argurus.netscheri<trivirgatus.lotor<argurus... | {
"end_byte": 60232,
"start_byte": 54734,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_60233_64262 | module nigra {
export class thalia<T0, T1> {
dichotomus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; }
arnuxii(): panamensis.linulus<trivirgatus.lotor<argurus.luctuosa, lavali.wilsoni>, lavali.beisa> { var x: panamensis.linulus<trivirgatus.lotor<argur... | {
"end_byte": 64262,
"start_byte": 60233,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_64263_66717 | module nigra {
export class gracilis<T0, T1> {
weddellii(): nigra.dolichurus<dogramacii.aurata, julianae.steerii> { var x: nigra.dolichurus<dogramacii.aurata, julianae.steerii>; () => { var y = this; }; return x; }
echinothrix(): Lanthanum.nitidus<panglima.amphibius<caurinus.megaphyllus, lavali.lept... | {
"end_byte": 66717,
"start_byte": 64263,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_66718_71466 | module samarensis {
export class pelurus<T0, T1> extends sagitta.stolzmanni {
Palladium(): panamensis.linulus<macrorhinos.konganensis, rionegrensis.caniventer> { var x: panamensis.linulus<macrorhinos.konganensis, rionegrensis.caniventer>; () => { var y = this; }; return x; }
castanea(): argurus.nets... | {
"end_byte": 71466,
"start_byte": 66718,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_71471_76352 | export class pallidus {
oblativa(): trivirgatus.falconeri { var x: trivirgatus.falconeri; () => { var y = this; }; return x; }
watersi(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; }
glacialis(): sagitta.cinereus<nigra.caucasica<julianae.sumatrana, trivirgatus.oco... | {
"end_byte": 76352,
"start_byte": 71471,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_76353_80899 | module argurus {
export class wetmorei<T0, T1> {
leucoptera(): petrophilus.rosalia<dogramacii.koepckeae, lutreolus.foina> { var x: petrophilus.rosalia<dogramacii.koepckeae, lutreolus.foina>; () => { var y = this; }; return x; }
ochraventer(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y =... | {
"end_byte": 80899,
"start_byte": 76353,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_80900_84730 | module patas {
export class uralensis {
cartilagonodus(): Lanthanum.nitidus<rionegrensis.caniventer, Lanthanum.jugularis> { var x: Lanthanum.nitidus<rionegrensis.caniventer, Lanthanum.jugularis>; () => { var y = this; }; return x; }
pyrrhinus(): lavali.beisa { var x: lavali.beisa; () => { var y = th... | {
"end_byte": 84730,
"start_byte": 80900,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_84731_89191 | module howi {
export class marcanoi extends Lanthanum.megalonyx {
formosae(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; }
dudui(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; }
leander(): daubentonii.nesiotes<Lan... | {
"end_byte": 89191,
"start_byte": 84731,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_89192_94470 | module lutreolus {
export class punicus {
strandi(): gabriellae.klossii<Lanthanum.jugularis, Lanthanum.jugularis> { var x: gabriellae.klossii<Lanthanum.jugularis, Lanthanum.jugularis>; () => { var y = this; }; return x; }
lar(): caurinus.mahaganus<julianae.nudicaudus, lavali.otion> { var x: caurinus... | {
"end_byte": 94470,
"start_byte": 89192,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_94471_99824 | module gabriellae {
export class klossii<T0, T1> extends imperfecta.lasiurus<dogramacii.robustulus, caurinus.psilurus> {
}
export class amicus {
pirrensis(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; }
phaeura(): panglima.abidi<lutreolus.foina, argurus.pe... | {
"end_byte": 99824,
"start_byte": 94471,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_99825_103519 | module quasiater {
export class wattsi<T0, T1> {
lagotis(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; }
hussoni(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; }
bilarni(): samarensis.cahirinus<rendalli.crenulata<lava... | {
"end_byte": 103519,
"start_byte": 99825,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_103520_108219 | module lutreolus {
export class foina {
tarfayensis(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; }
Promethium(): samarensis.pelurus<argurus.germaini, julianae.durangae> { var x: samarensis.pelurus<argurus.germaini, julianae.durangae>; () => { var y = this; }; r... | {
"end_byte": 108219,
"start_byte": 103520,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_108220_113333 | module sagitta {
export class stolzmanni {
riparius(): nigra.dolichurus<dogramacii.koepckeae, caurinus.psilurus> { var x: nigra.dolichurus<dogramacii.koepckeae, caurinus.psilurus>; () => { var y = this; }; return x; }
dhofarensis(): lutreolus.foina { var x: lutreolus.foina; () => { var y = this; }; ... | {
"end_byte": 113333,
"start_byte": 108220,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_113334_116271 | module argurus {
export class netscheri<T0, T1> {
gravis(): nigra.caucasica<rendalli.crenulata<trivirgatus.falconeri, howi.marcanoi>, dogramacii.kaiseri> { var x: nigra.caucasica<rendalli.crenulata<trivirgatus.falconeri, howi.marcanoi>, dogramacii.kaiseri>; () => { var y = this; }; return x; }
rusch... | {
"end_byte": 116271,
"start_byte": 113334,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_116272_120333 | module ruatanica {
export class Praseodymium<T0, T1> extends ruatanica.hector<lutreolus.punicus, gabriellae.amicus> {
clara(): panglima.amphibius<imperfecta.ciliolabrum<quasiater.carolinensis, lavali.beisa>, argurus.dauricus<ruatanica.americanus, rionegrensis.caniventer>> { var x: panglima.amphibius<imperfe... | {
"end_byte": 120333,
"start_byte": 116272,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts_120334_124853 | module panamensis {
export class setulosus<T0, T1> {
duthieae(): caurinus.mahaganus<howi.coludo<argurus.oreas, howi.marcanoi>, dogramacii.aurata> { var x: caurinus.mahaganus<howi.coludo<argurus.oreas, howi.marcanoi>, dogramacii.aurata>; () => { var y = this; }; return x; }
guereza(): howi.coludo<sag... | {
"end_byte": 124853,
"start_byte": 120334,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts"
} |
TypeScript/tests/cases/compiler/jsFileCompilationEnumSyntax.ts_0_47 | // @allowJs: true
// @filename: a.js
enum E { } | {
"end_byte": 47,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/jsFileCompilationEnumSyntax.ts"
} |
TypeScript/tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts_0_320 | // Repro from #13351
type Meta<T, A> = {
readonly[P in keyof T]: {
value: T[P];
also: A;
readonly children: Meta<T[P], A>;
};
}
interface Input {
x: string;
y: number;
}
declare const output: Meta<Input, boolean>;
const shouldFail: { important: boolean } = output.x.children;
| {
"end_byte": 320,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/mappedTypeWithCombinedTypeMappers.ts"
} |
TypeScript/tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts_0_205 | declare module X { export interface bar { } }
declare module "m" {
module X { export interface foo { } }
export { X };
export function foo(): X.foo;
export function bar(): X.bar; // error
} | {
"end_byte": 205,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts"
} |
TypeScript/tests/cases/compiler/lateBoundMethodNameAssigmentJS.ts_0_328 | // @allowJs: true
// @checkJs: true
// @emitDeclarationOnly: true
// @strict: true
// @target: es6
// @declaration: true
// @filename: lateBoundMethodNameAssigmentJS.js
const _symbol = Symbol("_sym");
export class MyClass {
constructor() {
this[_symbol] = this[_symbol].bind(this);
}
async [_symbol]... | {
"end_byte": 328,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/lateBoundMethodNameAssigmentJS.ts"
} |
TypeScript/tests/cases/compiler/commonSourceDir1.ts_0_103 | // @outDir: A:/
// @Filename: A:/foo/bar.ts
var x: number;
// @Filename: A:/foo/baz.ts
var y: number;
| {
"end_byte": 103,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/commonSourceDir1.ts"
} |
TypeScript/tests/cases/compiler/reachabilityChecks5.ts_0_1709 | // @allowUnreachableCode: false
// @noImplicitReturns: true
function f0(x): number {
while (true);
}
function f1(x): number {
if (x) {
return 1
}
}
function f2(x): number {
while (x) {
throw new Error();
}
return 1;
}
function f3(x): number {
while (x) {
throw new... | {
"end_byte": 1709,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/reachabilityChecks5.ts"
} |
TypeScript/tests/cases/compiler/declarationEmitDefaultExport8.ts_0_102 | // @declaration: true
// @target: es6
var _default = 1;
export {_default as d}
export default 1 + 2;
| {
"end_byte": 102,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/declarationEmitDefaultExport8.ts"
} |
TypeScript/tests/cases/compiler/augmentedTypesClass4.ts_0_100 | //// class then class
class c3 { public foo() { } } // error
class c3 { public bar() { } } // error
| {
"end_byte": 100,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/augmentedTypesClass4.ts"
} |
TypeScript/tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts_0_140 | interface I {
x1(a: number, callback: (x: 'hi') => number);
}
var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error | {
"end_byte": 140,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.ts"
} |
TypeScript/tests/cases/compiler/contextualTypingOfOptionalMembers.tsx_0_1891 | // @noImplicitAny: true
// @strictNullChecks: true
// @jsx: preserve
// @filename: index.tsx
interface ActionsObject<State> {
[prop: string]: (state: State) => State;
}
interface Options<State, Actions> {
state?: State;
view?: (state: State, actions: Actions) => any;
actions: string | Actions;
}
decla... | {
"end_byte": 1891,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/contextualTypingOfOptionalMembers.tsx"
} |
TypeScript/tests/cases/compiler/letInLetConstDeclOfForOfAndForIn_ES5.ts_0_288 | // @target: es5
// Should be an error
for (let let of [1,2,3]) {}
for (const let of [1,2,3]) {}
for (let let in [1,2,3]) {}
for (const let in [1,2,3]) {}
{
for (let let of [1,2,3]) {}
for (const let of [1,2,3]) {}
for (let let in [1,2,3]) {}
for (const let in [1,2,3]) {}
}
| {
"end_byte": 288,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/letInLetConstDeclOfForOfAndForIn_ES5.ts"
} |
TypeScript/tests/cases/compiler/staticOffOfInstance1.ts_0_77 | class List {
public Blah() {
this.Foo();
}
public static Foo() {}
} | {
"end_byte": 77,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/staticOffOfInstance1.ts"
} |
TypeScript/tests/cases/compiler/commentEmitOnParenthesizedAssertionInReturnStatement.ts_0_331 | // @strict: true
// @lib: esnext
// @target: esnext
// @removeComments: false
export class Foo {
client = {
getThing: () => Promise.resolve('')
}
foo(): Promise<void> {
return (
/* TODO: Avoid using type assertions, please refactor. */ this.client
.getThing() as unknown as Promise<void>
... | {
"end_byte": 331,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/commentEmitOnParenthesizedAssertionInReturnStatement.ts"
} |
TypeScript/tests/cases/compiler/declFileForExportedImport.ts_0_317 | // @declaration: true
// @module: commonjs
// @Filename: declFileForExportedImport_0.ts
export var x: number;
// @Filename: declFileForExportedImport_1.ts
///<reference path='declFileForExportedImport_0.ts'/>
export import a = require('./declFileForExportedImport_0');
var y = a.x;
export import b = a;
var z = b.x; | {
"end_byte": 317,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/declFileForExportedImport.ts"
} |
TypeScript/tests/cases/compiler/letDeclarations-scopes-duplicates3.ts_0_93 | // @target: ES6
// @Filename: file1.ts
let var1 = 0;
// @Filename: file2.ts
const var1 = 0; | {
"end_byte": 93,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/letDeclarations-scopes-duplicates3.ts"
} |
TypeScript/tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts_0_227 | var myCars=new Array();
var myCars3 = new Array({});
var myCars4: Array; // error
var myCars5: Array<any>[];
myCars = myCars3;
myCars = myCars4;
myCars = myCars5;
myCars3 = myCars;
myCars3 = myCars4;
myCars3 = myCars5;
| {
"end_byte": 227,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts"
} |
TypeScript/tests/cases/compiler/requireOfJsonFileNonRelativeWithoutExtension.ts_0_476 | // @module: commonjs
// @outdir: out/
// @allowJs: true
// @fullEmitPaths: true
// @resolveJsonModule: true
// @Filename: /src/projects/file1.ts
import d = require("d.json"); // Should fail
import e = require("e"); // Should fail
// @Filename: /src/projects/node_modules/b.json
{
"a": true,
"b": "hello"
}
// ... | {
"end_byte": 476,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/requireOfJsonFileNonRelativeWithoutExtension.ts"
} |
TypeScript/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts_0_3637 | //@module: amd
//@declaration: true
// private elements
module m_private {
export class c_private {
}
export enum e_private {
Happy,
Grumpy
}
export function f_private() {
return new c_private();
}
export var v_private = new c_private();
export interface i_private... | {
"end_byte": 3637,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts"
} |
TypeScript/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts_0_297 | // @declaration: true
var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: true } } };
function f15() {
var a4 = "hello";
var b4 = 1;
var c4 = true;
return { a4, b4, c4 };
}
var { a4, b4, c4 } = f15();
module m {
export var { a4, b4, c4 } = f15();
} | {
"end_byte": 297,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts"
} |
TypeScript/tests/cases/compiler/contextuallyTypedByDiscriminableUnion.ts_0_424 | // @noImplicitAny: true
type ADT = {
kind: "a",
method(x: string): number;
} | {
kind: "b",
method(x: number): string;
};
function invoke(item: ADT) {
if (item.kind === "a") {
item.method("");
}
else {
item.method(42);
}
}
invoke({
kind: "a",
method(a) {
... | {
"end_byte": 424,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/contextuallyTypedByDiscriminableUnion.ts"
} |
TypeScript/tests/cases/compiler/moduleAugmentationInAmbientModule1.ts_0_451 | // @module: commonjs
// @declaration: true
// @filename: O.d.ts
declare module "Observable" {
class Observable {}
}
declare module "M" {
class Cls { x: number }
}
declare module "Map" {
import { Cls } from "M";
module "Observable" {
interface Observable {
foo(): Cls;
}
... | {
"end_byte": 451,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/moduleAugmentationInAmbientModule1.ts"
} |
TypeScript/tests/cases/compiler/APISample_WatchWithOwnWatchHost.ts_3_2341 | @module: commonjs
// @skipLibCheck: true
// @noImplicitAny:true
// @strictNullChecks:true
// @noTypesAndSymbols: true
// @filename: node_modules/typescript/package.json
{
"name": "typescript",
"types": "/.ts/typescript.d.ts"
}
// @filename: APISample_WatchWithOwnWatchHost.ts
/*
* Note: This test is a public... | {
"end_byte": 2341,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/APISample_WatchWithOwnWatchHost.ts"
} |
TypeScript/tests/cases/compiler/accessorDeclarationEmitJs.ts_0_366 | // @allowJs: true
// @checkJs: true
// @declaration: true
// @emitDeclarationOnly: true
// @filename: /a.js
export const t1 = {
p: 'value',
get getter() {
return 'value';
},
}
export const t2 = {
v: 'value',
set setter(v) {},
}
export const t3 = {
p: 'value',
get value() {
... | {
"end_byte": 366,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/accessorDeclarationEmitJs.ts"
} |
TypeScript/tests/cases/compiler/parameterPropertyInConstructor3.ts_0_59 | class Foo {
constructor(public constructor: string) {}
}
| {
"end_byte": 59,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/parameterPropertyInConstructor3.ts"
} |
TypeScript/tests/cases/compiler/ambientEnumElementInitializer4.ts_0_27 | declare enum E {
e = 0xA
} | {
"end_byte": 27,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/ambientEnumElementInitializer4.ts"
} |
TypeScript/tests/cases/compiler/conflictingDeclarationsImportFromNamespace1.ts_0_690 | // @strict: true
// @filename: node_modules/@types/lodash/object.d.ts
import _ = require("./index");
declare module "./index" {
interface LoDashStatic {
pick<T extends object, U extends keyof T>(
object: T,
...props: Array<U>
): Pick<T, U>;
}
}
// @filename: node_modules/@types/lod... | {
"end_byte": 690,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/conflictingDeclarationsImportFromNamespace1.ts"
} |
TypeScript/tests/cases/compiler/moduleAssignmentCompat2.ts_0_139 | module A {
export class C { }
}
module B {
export class C { }
export class D { }
}
var a: A;
var b: B;
a = b;
b = a; // error | {
"end_byte": 139,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/moduleAssignmentCompat2.ts"
} |
TypeScript/tests/cases/compiler/isolatedDeclarationErrorsAugmentation.ts_0_632 | // @declaration: true
// @isolatedDeclarations: true
// @declarationMap: false
// @strict: true
// @target: ESNext
// @filename: child1.ts
import { ParentThing } from './parent';
declare module './parent' {
interface ParentThing {
add: (a: number, b: number) => number;
}
}
export function child1(prot... | {
"end_byte": 632,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/isolatedDeclarationErrorsAugmentation.ts"
} |
TypeScript/tests/cases/compiler/objectBindingPattern_restElementWithPropertyName.ts_0_24 | const { ...a: b } = {};
| {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/objectBindingPattern_restElementWithPropertyName.ts"
} |
TypeScript/tests/cases/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.ts_0_68 | const foo = 1
class Foo {}
interface Foo {}
export {foo, Foo, Foo}
| {
"end_byte": 68,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.ts"
} |
TypeScript/tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts_0_111 | // @target: es5
// @module: commonjs
// @isolatedModules: true
declare function run(a: number): void;
run(1);
| {
"end_byte": 111,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts"
} |
TypeScript/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts_0_285 | declare function exports(): number;
declare function require(): string;
declare module m3 {
function exports(): string[];
function require(): number[];
}
module m4 {
export declare function exports(): string;
export declare function require(): string;
var a = 10;
} | {
"end_byte": 285,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts"
} |
TypeScript/tests/cases/compiler/thisCapture1.ts_0_184 | class X {
private y = 0;
public getSettings(keys: string[]): any {
var ret: any;
return ret.always(() => {
this.y = 0;
}).promise();
}
} | {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/thisCapture1.ts"
} |
TypeScript/tests/cases/compiler/primitiveUnionDetection.ts_0_259 | // @strict: true
// @declaration: true
// Repro from #46624
type Kind = "one" | "two" | "three";
declare function getInterfaceFromString<T extends Kind>(options?: { type?: T } & { type?: Kind }): T;
const result = getInterfaceFromString({ type: 'two' });
| {
"end_byte": 259,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/primitiveUnionDetection.ts"
} |
TypeScript/tests/cases/compiler/contextualTypingWithGenericAndNonGenericSignature.ts_3_618 | • If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2)... | {
"end_byte": 618,
"start_byte": 3,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/contextualTypingWithGenericAndNonGenericSignature.ts"
} |
TypeScript/tests/cases/compiler/jsxNamespaceReexports.tsx_0_399 |
// @jsx: react
// @jsxFactory: MyLib.createElement
// @strict: true
// @filename: library.ts
function createElement(element: string, props: any, ...children: any[]): any {}
namespace JSX {
export interface IntrinsicElements {
[key: string]: Record<string, any>;
}
}
export { createElement, JSX };
// @filename... | {
"end_byte": 399,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/jsxNamespaceReexports.tsx"
} |
TypeScript/tests/cases/compiler/undefinedTypeArgument1.ts_0_29 | var cats = new Array<WAWA>(); | {
"end_byte": 29,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/undefinedTypeArgument1.ts"
} |
TypeScript/tests/cases/compiler/noImplicitUseStrict_amd.ts_0_64 | // @module: amd
// @noImplicitUseStrict: true
export var x = 0; | {
"end_byte": 64,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/noImplicitUseStrict_amd.ts"
} |
TypeScript/tests/cases/compiler/moduleMerge.ts_0_350 | // This should not compile both B classes are in the same module this should be a collission
module A
{
class B
{
public Hello(): string
{
return "from private B";
}
}
}
module A
{
export class B
{
public Hello(): string
{
return "fro... | {
"end_byte": 350,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/moduleMerge.ts"
} |
TypeScript/tests/cases/compiler/inheritanceMemberFuncOverridingProperty.ts_0_92 | class a {
x: () => string;
}
class b extends a {
x() {
return "20";
}
} | {
"end_byte": 92,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/inheritanceMemberFuncOverridingProperty.ts"
} |
TypeScript/tests/cases/compiler/sourceMap-SkippedNode.ts_0_70 | //@sourceMap: true
try {
// ...
} finally {
// N.B. No 'catch' block
} | {
"end_byte": 70,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/sourceMap-SkippedNode.ts"
} |
TypeScript/tests/cases/compiler/recursiveIdenticalAssignment.ts_0_208 | interface A<T> {
x: A<T>
}
interface B<T extends B<B<T>>> { // error, constraint referencing itself
x: B<T>
}
var a: A<A<any>>
var b: B<B<any>> = a // Error, any does not satisfy constraint B<B<T>>
| {
"end_byte": 208,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/recursiveIdenticalAssignment.ts"
} |
TypeScript/tests/cases/compiler/excessPropertyCheckWithUnions.ts_0_3111 | // @strict: true
type ADT = {
tag: "A",
a1: string
} | {
tag: "D",
d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
} | {
tag: "T",
}
let wrong: ADT = { tag: "T", a1: "extra" }
wrong = { tag: "A", d20: 12 }
wrong = { tag: "D" }
type Ambiguous = {
tag... | {
"end_byte": 3111,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/excessPropertyCheckWithUnions.ts"
} |
TypeScript/tests/cases/compiler/exportDefaultInterfaceAndFunctionOverloads.ts_0_220 | export default function foo(value: number): number
export default function foo(value: string): string
export default function foo(value: string | number): string | number {
return 1
}
export default interface Foo {}
| {
"end_byte": 220,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/exportDefaultInterfaceAndFunctionOverloads.ts"
} |
TypeScript/tests/cases/compiler/overloadedConstructorFixesInferencesAppropriately.ts_0_639 | // @strict: true
interface Box<T> {
v: T;
}
interface ErrorResult {
readonly error: true
}
interface AsyncLoaderProps<TResult extends {}> {
readonly asyncLoad: () => Box<TResult>;
readonly children: (result: Exclude<TResult, ErrorResult>) => string;
}
class AsyncLoader<TResult extends {}> {
const... | {
"end_byte": 639,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/overloadedConstructorFixesInferencesAppropriately.ts"
} |
TypeScript/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts_0_4934 | // @lib: es5
// @sourcemap: true
declare var console: {
log(msg: any): void;
}
interface Robot {
name: string;
skill: string;
}
interface MultiRobot {
name: string;
skills: {
primary?: string;
secondary?: string;
};
}
let robot: Robot = { name: "mower", skill: "mowing" };
let m... | {
"end_byte": 4934,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.ts"
} |
TypeScript/tests/cases/compiler/letConstMatchingParameterNames.ts_0_266 | // @lib: es5
// @target: es5
let parent = true;
const parent2 = true;
declare function use(a: any);
function a() {
let parent = 1;
const parent2 = 2;
function b(parent: string, parent2: number) {
use(parent);
use(parent2);
}
}
| {
"end_byte": 266,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/letConstMatchingParameterNames.ts"
} |
TypeScript/tests/cases/compiler/recursiveTupleTypes1.ts_0_168 | interface Tree1 {
children: [Tree1, Tree2];
}
interface Tree2 {
children: [Tree2, Tree1];
}
let tree1: Tree1;
let tree2: Tree2;
tree1 = tree2;
tree2 = tree1;
| {
"end_byte": 168,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/recursiveTupleTypes1.ts"
} |
TypeScript/tests/cases/compiler/privateAccessInSubclass1.ts_0_101 | class Base {
private options: any;
}
class D extends Base {
myMethod() {
this.options;
}
} | {
"end_byte": 101,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/privateAccessInSubclass1.ts"
} |
TypeScript/tests/cases/compiler/mergeSymbolReexportedTypeAliasInstantiation.ts_0_400 | // @moduleResolution: node
// @filename: main.ts
import {Row2, C} from '.'
const x: ((rowData: Row2<string>) => unknown) = (rowData: Row2<any>) => (null)
const y : C = { s: '' }
// @filename: ./a.d.ts
import '.'
declare module '.' {
type Row2<T> = {}
type C = { s : string }
}
// @filename: ./index.d.ts
export ty... | {
"end_byte": 400,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/mergeSymbolReexportedTypeAliasInstantiation.ts"
} |
TypeScript/tests/cases/compiler/incrementalOut.ts_0_61 | // @incremental: true
// @outFile: output.js
const x = 10;
| {
"end_byte": 61,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/incrementalOut.ts"
} |
TypeScript/tests/cases/compiler/namespacesDeclaration1.ts_0_128 | // @declaration: true
module M {
export namespace N {
export module M2 {
export interface I {}
}
}
} | {
"end_byte": 128,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/namespacesDeclaration1.ts"
} |
TypeScript/tests/cases/compiler/genericCloduleInModule2.ts_0_175 | module A {
export class B<T> {
foo() { }
static bar() { }
}
}
module A {
export module B {
export var x = 1;
}
}
var b: A.B;
b.foo(); | {
"end_byte": 175,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/genericCloduleInModule2.ts"
} |
TypeScript/tests/cases/compiler/classMemberInitializerScoping.ts_0_354 | var aaa = 1;
class CCC {
y: number = aaa;
static staticY: number = aaa; // This shouldnt be error
constructor(aaa) {
this.y = ''; // was: error, cannot assign string to number
}
}
// above is equivalent to this:
var aaaa = 1;
class CCCC {
y: any;
constructor(aaaa) {
this.y = aaa... | {
"end_byte": 354,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/classMemberInitializerScoping.ts"
} |
TypeScript/tests/cases/compiler/functionCall16.ts_0_144 | function foo(a:string, b?:string, ...c:number[]){}
foo('foo', 1);
foo('foo');
foo('foo', 'bar');
foo();
foo(1, 'bar');
foo('foo', 'bar', 3);
| {
"end_byte": 144,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/functionCall16.ts"
} |
TypeScript/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts_0_2065 | // @target: ES5
// @module: commonjs
// @declaration: true
module m {
class private1 {
}
export class public1 {
}
module m2 {
export class public2 {
}
}
export class c {
// getter with annotation
get foo1(): private1 {
return;
}
... | {
"end_byte": 2065,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts"
} |
TypeScript/tests/cases/compiler/interfaceImplementation1.ts_0_548 | interface I1 {
iObj:{ };
iNum:number;
iAny:any;
iFn():void;
}
interface I2 {
iFn(n:number, s:string):void;
}
class C1 implements I1,I2 {
private iFn();
private iFn(n?:number, s?:string) { }
private iAny:any;
private iNum:number;
private iObj:{ };
}
interface I3 {
x: number;
}
i... | {
"end_byte": 548,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/interfaceImplementation1.ts"
} |
TypeScript/tests/cases/compiler/circularReferenceInImport.ts_0_213 | // @declaration: true
// @filename: db.d.ts
declare namespace Db {
export import Types = Db;
}
export = Db;
// @filename: app.ts
import * as Db from "./db"
export function foo() {
return new Object()
} | {
"end_byte": 213,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/circularReferenceInImport.ts"
} |
TypeScript/tests/cases/compiler/commentsOverloads.ts_0_3649 | // @target: ES5
// @declaration: true
// @removeComments: false
/** this is signature 1*/
function f1(/**param a*/a: number): number;
function f1(b: string): number;
function f1(aOrb: any) {
return 10;
}
f1("hello");
f1(10);
function f2(a: number): number;
/** this is signature 2*/
function f2(b: string): number;
/... | {
"end_byte": 3649,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/commentsOverloads.ts"
} |
TypeScript/tests/cases/compiler/unusedMultipleParameters1InFunctionDeclaration.ts_0_154 | //@noUnusedLocals:true
//@noUnusedParameters:true
function greeter(person: string, person2: string) {
var unused = 20;
person2 = "dummy value";
} | {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/unusedMultipleParameters1InFunctionDeclaration.ts"
} |
TypeScript/tests/cases/compiler/noCrashOnThisTypeUsage.ts_0_683 | // @strict: true
interface IListenable {
changeListeners: Function[] | null
observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): void
}
function notifyListeners<T>(listenable: IListenable, change: T) {
}
export class ObservableValue<T> {
constructor(
public value: T... | {
"end_byte": 683,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/noCrashOnThisTypeUsage.ts"
} |
TypeScript/tests/cases/compiler/noInferUnionExcessPropertyCheck1.ts_0_647 | // @strict: true
// @noEmit: true
declare function test1<T extends { x: string }>(
a: T,
b: NoInfer<T> | (() => NoInfer<T>),
): void;
test1({ x: "foo" }, { x: "bar" }); // no error
test1({ x: "foo" }, { x: "bar", y: 42 }); // epc error
declare function test2<T extends { x: string }>(
a: T,
b: NoInfer<T> | No... | {
"end_byte": 647,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/noInferUnionExcessPropertyCheck1.ts"
} |
TypeScript/tests/cases/compiler/allowJsClassThisTypeCrash.ts_0_151 | // @checkJs: true
// @allowJs: true
// @noEmit: true
// @filename: app.js
const f = function() {};
var g = f;
g.prototype.m = function () {
this;
}; | {
"end_byte": 151,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/allowJsClassThisTypeCrash.ts"
} |
TypeScript/tests/cases/compiler/fatarrowfunctionsInFunctions.ts_0_302 | declare function setTimeout(expression: any, msec?: number, language?: any): number;
var messenger = {
message: "Hello World",
start: function() {
var _self = this;
setTimeout(function() {
_self.message.toString();
}, 3000);
}
};
messenger.start();
| {
"end_byte": 302,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/fatarrowfunctionsInFunctions.ts"
} |
TypeScript/tests/cases/compiler/nonNullableAndObjectIntersections.ts_0_434 | // @strict: true, false
// These should all resolve to never
type T0 = NonNullable<null>;
type T1 = NonNullable<undefined>;
type T2 = null & {};
type T3 = undefined & {};
type T4 = null & undefined;
type T6 = null & { a: string } & {};
// Repro from #50519
type NonNullableNew<T> = T & {};
type NonNullableOld<T> = T... | {
"end_byte": 434,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/nonNullableAndObjectIntersections.ts"
} |
TypeScript/tests/cases/compiler/noRepeatedPropertyNames.ts_0_196 | // @strict: false
// https://github.com/microsoft/TypeScript/issues/46815
const first = { a: 1, a: 2 };
class C {
m() {
const second = { a: 1, a: 2 };
return second.a;
}
}
| {
"end_byte": 196,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/noRepeatedPropertyNames.ts"
} |
TypeScript/tests/cases/compiler/dynamicImportInDefaultExportExpression.ts_0_124 | // @skipLibCheck: true
// @lib: es6
export default {
getInstance: function () {
return import('./foo2');
}
} | {
"end_byte": 124,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/dynamicImportInDefaultExportExpression.ts"
} |
TypeScript/tests/cases/compiler/typeInferenceReturnTypeCallback.ts_0_430 | interface IList<A> {
map<B>(f: (t: A) => B): IList<B>;
}
class Nil<C> implements IList<C>{
map<D>(f: (t: C) => D): IList<D> {
return null;
}
}
class Cons<T> implements IList<T>{
map<U>(f: (t: T) => U): IList<U> {
return this.foldRight(new Nil<U>(), (t, acc) => {
return new ... | {
"end_byte": 430,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/typeInferenceReturnTypeCallback.ts"
} |
TypeScript/tests/cases/compiler/cf.ts_0_876 | // @allowUnreachableCode: false
function f() {
var z;
var x=10;
var y=3;
L1: for (var i=0;i<19;i++) {
if (y==7) {
continue L1;
x=11;
}
if (y==3) {
y++;
}
else {
y--;
}
do {
y+=2;
... | {
"end_byte": 876,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/cf.ts"
} |
TypeScript/tests/cases/compiler/typePredicateInLoop.ts_0_374 | // Repro from #12101
interface Type {
type: number;
}
interface TypeExt extends Type {
arr: Type[];
}
const guard = (arg: Type): arg is TypeExt => arg.type === 1;
const otherFunc = (arg1: Type, arg2: TypeExt): void => {};
export function y(arg: Type): void {
if (guard(arg)) {
for (const ITEM of arg.arr) {... | {
"end_byte": 374,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/typePredicateInLoop.ts"
} |
TypeScript/tests/cases/compiler/mappedTypeInferenceFromApparentType.ts_0_259 | // @strict: true
// @noEmit: true
type Obj = {
[s: string]: number;
};
type foo = <T>(target: { [K in keyof T]: T[K] }) => void;
type bar = <U extends string[]>(source: { [K in keyof U]: Obj[K] }) => void;
declare let f: foo;
declare let b: bar;
b = f; | {
"end_byte": 259,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/mappedTypeInferenceFromApparentType.ts"
} |
TypeScript/tests/cases/compiler/arrayFromAsync.ts_0_1359 | // @module: esnext
// @target: esnext
export { };
async function * asyncGen (n) {
for (let i = 0; i < n; i++)
yield i * 2;
}
function * genPromises (n) {
for (let i = 0; i < n; i++) {
yield Promise.resolve(i * 2);
}
}
const arrLike = {
0: Promise.resolve(0),
1: Promise.resolve(2),... | {
"end_byte": 1359,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/arrayFromAsync.ts"
} |
TypeScript/tests/cases/compiler/classOrder1.ts_0_101 | class A {
public foo() {
/*WScript.Echo("Here!");*/
}
}
var a = new A();
a.foo();
| {
"end_byte": 101,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/classOrder1.ts"
} |
TypeScript/tests/cases/compiler/typeofAmbientExternalModules.ts_0_538 | // @module: commonjs
// @Filename: typeofAmbientExternalModules_0.ts
export class C { foo: string; }
// @Filename: typeofAmbientExternalModules_1.ts
class D { bar: string; }
export = D;
// @Filename: typeofAmbientExternalModules_2.ts
///<reference path='typeofAmbientExternalModules_0.ts'/>
///<reference path='typeofA... | {
"end_byte": 538,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/typeofAmbientExternalModules.ts"
} |
TypeScript/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts_0_227 | interface I {
// Used to be indexer, now it is a computed property
[x]: string;
[x: string];
}
class C {
// Used to be indexer, now it is a computed property
[x]: string
}
class C2 {
[x: string]
} | {
"end_byte": 227,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.