_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts_0_112 | // @useDefineForClassFields: false
// @target: es2015
class C {
static #x = 1;
static {
C.#x;
}
}
| {
"end_byte": 112,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock12.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts_0_681 | // @target: esnext, es2022
class C {
static {
await; // illegal
}
static {
await (1); // illegal
}
static {
({ [await]: 1 }); // illegal
}
static {
class D {
[await] = 1; // illegal (computed property names are evaluated outside of a class body
... | {
"end_byte": 681,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock26.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts_0_172 | // @target: esnext, es2022, es2015
// @useDefineForClassFields: true
class C {
static #x = 123;
static {
console.log(C.#x)
}
foo () {
return C.#x;
}
}
| {
"end_byte": 172,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock13.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts_0_305 | // https://github.com/microsoft/TypeScript/issues/44872
void class Foo {
static prop = 1
static {
console.log(Foo.prop);
Foo.prop++;
}
static {
console.log(Foo.prop);
Foo.prop++;
}
static {
console.log(Foo.prop);
Foo.prop++;
}
} | {
"end_byte": 305,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock27.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts_0_306 | // @target: esnext, es2022
const nums = [1, 2, 3].map(n => Promise.resolve(n))
class C {
static {
for await (const nn of nums) {
console.log(nn)
}
}
}
async function foo () {
class C {
static {
for await (const nn of nums) {
console.log(nn)
}
}
}
}
| {
"end_byte": 306,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts_0_479 | // @target: es2015
let friendA: { getX(o: A): number, setX(o: A, v: number): void };
class A {
#x: number;
constructor (v: number) {
this.#x = v;
}
getX () {
return this.#x;
}
static {
friendA = {
getX(obj) { return obj.#x },
setX(obj, value) { obj.#x = value }
};
}
};
cl... | {
"end_byte": 479,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts_0_137 | // @target: esnext, es2022, es2015, es5
class A {
static bar = A.foo + 1
static {
A.foo + 2;
}
static foo = 1;
}
| {
"end_byte": 137,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock9.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock28.ts_0_100 | // @strict: true
let foo: number;
class C {
static {
foo = 1
}
}
console.log(foo) | {
"end_byte": 100,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock28.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef5.ts_0_133 | // @strict: true
// @target: esnext
// @declaration: true
class C {
static {
this.x = 1;
}
static accessor x;
}
| {
"end_byte": 133,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef5.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts_0_209 | // @target: esnext, es2022, es2015, es5
const a = 1;
const b = 2;
class C {
static {
const a = 11;
a;
b;
}
static {
const a = 11;
a;
b;
}
}
| {
"end_byte": 209,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock2.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts_0_220 | // @target: esnext, es2022, es2015, es5
function foo () {
return class {
static foo = 1;
static {
const c = class {
static bar = 2;
static {
// do
}
}
}
}
}
| {
"end_byte": 220,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts_0_208 | // @target: esnext, es2022
// @noEmit: true
// @strict: true
class C {
static x;
static {
this.x = 1;
}
static y = this.x;
static z;
static {
this.z = this.y;
}
}
| {
"end_byte": 208,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef1.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts_0_939 | class B {
static a = 1;
}
class C extends B {
static {
let await = 1;
let arguments = 1;
let eval = 1;
}
static {
await: if (true) {
}
arguments;
await;
super();
}
}
class CC {
constructor () {
class C extends B {
... | {
"end_byte": 939,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts_0_67 | class C {
@decorator
static {
// something
}
}
| {
"end_byte": 67,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock19.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts_0_571 | class C {
static {
await 1;
yield 1;
return 1;
}
}
async function f1 () {
class C {
static {
await 1;
async function ff () {
await 1;
}
}
}
}
function * f2 () {
class C {
static {
yield... | {
"end_byte": 571,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock7.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef4.ts_0_232 | // @strict: true
// @target: esnext
// @declaration: true
class C {
static accessor x;
static {
this.x = 1;
}
static accessor y = this.x;
static accessor z;
static {
this.z = this.y;
}
}
| {
"end_byte": 232,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlockUseBeforeDef4.ts"
} |
TypeScript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts_0_229 | // @target: esnext, es2022
const a = 1;
class C {
static f1 = 1;
static {
console.log(C.f1, C.f2, C.f3)
}
static f2 = 2;
static {
console.log(C.f1, C.f2, C.f3)
}
static f3 = 3;
}
| {
"end_byte": 229,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-8.ts_0_512 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: /test/types
// @currentDirectory: /test
// Don't crash in circular library reference situations
// @filename: /test/types/alpha/index.d.ts
/// <reference types="beta" />
declare var alpha: { a: string };
// @filename: /test/types/beta/index.d.ts... | {
"end_byte": 512,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-8.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-2.ts_0_390 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: /types
// @currentDirectory: /test
// package.json in a primary reference can refer to another file
// @filename: /types/jquery/package.json
{
"types": "jquery.d.ts"
}
// @filename: /types/jquery/jquery.d.ts
declare var $: { foo(): void };
... | {
"end_byte": 390,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-2.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-15.ts_0_328 | // @noImplicitReferences: true
// @traceResolution: true
// @types: jquery
// @typeRoots: /a/types
// @filename: /a/types/jquery/index.d.ts
declare var $: { foo(): void };
// @filename: /a/types/jquery2/index.d.ts
declare var $2: { foo(): void };
// @filename: /a/b/consumer.ts
$.foo(); // should OK
$2.foo(); // shou... | {
"end_byte": 328,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-15.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-6.ts_0_357 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// The primary lookup folder is relative to tsconfig.json, if present
// @filename: /node_modules/@types/alpha/index.d.ts
declare var alpha: { a: string };
// @filename: /src/foo.ts
/// <reference types="alpha" />
var x: string = alpha.... | {
"end_byte": 357,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-6.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-11.ts_0_408 | // @allowJs: true
// @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// package.json in a secondary reference can refer to another file
// @filename: /a/node_modules/jquery/package.json
{
"typings": "jquery.d.ts"
}
// @filename: /a/node_modules/jquery/jquery.d.ts
declare var $: { fo... | {
"end_byte": 408,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-11.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-7.ts_0_276 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// Secondary references are possible
// @filename: /src/node_modules/jquery/index.d.ts
declare var $: { foo(): void };
// @filename: /src/consumer.ts
/// <reference types="jquery" />
$.foo();
| {
"end_byte": 276,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-7.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-10.ts_0_380 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: /foo/types
// package.json in a primary reference can refer to another file
// @filename: /foo/types/jquery/package.json
{
"typings": "jquery.d.ts"
}
// @filename: /foo/types/jquery/jquery.d.ts
declare var $: { foo(): void };
// @filename:... | {
"end_byte": 380,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-10.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-3.ts_0_279 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /src
// Secondary references are possible
// @filename: /src/node_modules/jquery/index.d.ts
declare var $: { foo(): void };
// @filename: /src/consumer.ts
/// <reference types="jquery" />
$.foo();
| {
"end_byte": 279,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-3.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-14.ts_0_240 | // @noImplicitReferences: true
// @traceResolution: true
// @types: jquery
// @typeRoots: /a/types
// @currentDirectory: /a
// @filename: /a/types/jquery/index.d.ts
declare var $: { foo(): void };
// @filename: /a/b/consumer.ts
$.foo();
| {
"end_byte": 240,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-14.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-13.ts_0_387 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// load type declarations from types section of tsconfig
// @filename: /a/tsconfig.json
{
"compilerOptions": {
"types": [ "jquery" ],
"typeRoots": ["/a/types"]
}
}
// @filename: /a/types/jquery/index.d.ts
declare... | {
"end_byte": 387,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-13.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-4.ts_0_630 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: /src
// @currentDirectory: test
// Secondary references may be duplicated if they agree in content
// @filename: /node_modules/foo/index.d.ts
/// <reference types="alpha" />
declare var foo: any;
// @filename: /node_modules/foo/node_modules/alph... | {
"end_byte": 630,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-4.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-1.ts_0_280 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: /src/types
// We can find typings in the ./types folder
// @filename: /src/types/jquery/index.d.ts
declare var $: { foo(): void };
// @filename: /src/consumer.ts
/// <reference types="jquery" />
$.foo();
| {
"end_byte": 280,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-1.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-12.ts_0_398 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// package.json in a secondary reference can refer to another file
// @filename: /a/node_modules/jquery/package.json
{
"types": "dist/jquery.d.ts"
}
// @filename: /a/node_modules/jquery/dist/jquery.d.ts
declare var $: { foo(): void ... | {
"end_byte": 398,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-12.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-5.ts_0_634 | // @noImplicitReferences: true
// @traceResolution: true
// @currentDirectory: /
// @typeRoots: types
// Secondary references may not be duplicated if they disagree in content
// @filename: /node_modules/foo/index.d.ts
/// <reference types="alpha" />
declare var foo: any;
// @filename: /node_modules/foo/node_modules... | {
"end_byte": 634,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-5.ts"
} |
TypeScript/tests/cases/conformance/references/library-reference-scoped-packages.ts_0_214 | // @noImplicitReferences: true
// @traceResolution: true
// @typeRoots: types
// @filename: /node_modules/@types/beep__boop/index.d.ts
export const y = 0;
// @filename: /a.ts
/// <reference types="@beep/boop" />
| {
"end_byte": 214,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/references/library-reference-scoped-packages.ts"
} |
TypeScript/tests/cases/conformance/es2020/bigintMissingESNext.ts_0_216 | // @target: esnext
// @lib: dom,es2017
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// no error when bigint is used even when ES2020 lib is not present
| {
"end_byte": 216,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/bigintMissingESNext.ts"
} |
TypeScript/tests/cases/conformance/es2020/bigintMissingES2020.ts_0_216 | // @target: es2020
// @lib: dom,es2017
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// no error when bigint is used even when ES2020 lib is not present
| {
"end_byte": 216,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/bigintMissingES2020.ts"
} |
TypeScript/tests/cases/conformance/es2020/intlNumberFormatES2020.ts_0_966 | // @target: es2020
// @strict: true
// New/updated resolved options in ES2020
const { notation, style, signDisplay } = new Intl.NumberFormat('en-NZ').resolvedOptions();
// Empty options
new Intl.NumberFormat('en-NZ', {});
// Override numbering system
new Intl.NumberFormat('en-NZ', { numberingSystem: 'arab' });
// C... | {
"end_byte": 966,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/intlNumberFormatES2020.ts"
} |
TypeScript/tests/cases/conformance/es2020/es2020IntlAPIs.ts_0_2330 | // @target: es2020
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation
const count = 26254.39;
const date = new Date("2012-05-24");
function log(locale: string) {
console.log(
`${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.N... | {
"end_byte": 2330,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/es2020IntlAPIs.ts"
} |
TypeScript/tests/cases/conformance/es2020/bigintMissingES2019.ts_0_216 | // @target: es2019
// @lib: dom,es2019
declare function test<A, B extends A>(): void;
test<{t?: string}, object>();
test<{t?: string}, bigint>();
// no error when bigint is used even when ES2020 lib is not present
| {
"end_byte": 216,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/bigintMissingES2019.ts"
} |
TypeScript/tests/cases/conformance/es2020/constructBigint.ts_0_178 | // @target: esnext
// @lib: esnext
// @strict: true
BigInt(1);
BigInt(1n);
BigInt("0");
BigInt(false);
BigInt(Symbol());
BigInt({ e: 1, m: 1 })
BigInt(null);
BigInt(undefined)
| {
"end_byte": 178,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/constructBigint.ts"
} |
TypeScript/tests/cases/conformance/es2020/localesObjectArgument.ts_0_2028 | // @target: es2020
const enUS = new Intl.Locale("en-US");
const deDE = new Intl.Locale("de-DE");
const jaJP = new Intl.Locale("ja-JP");
const now = new Date();
const num = 1000;
const bigint = 123456789123456789n;
const str = "";
const readonlyLocales: Readonly<string[]> = ['de-DE', 'ja-JP'];
now.toLocaleString(enU... | {
"end_byte": 2028,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/localesObjectArgument.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace3.ts_0_322 | // @module: esnext, es2015, commonjs, amd, system, umd
// @filename: 0.ts
// @declaration: true
// @esModuleInterop: true
export const a = 1;
export const b = 2;
// @filename: 1.ts
export * as ns from './0';
ns.a;
ns.b;
let ns = {a: 1, b: 2}
ns.a;
ns.b;
// @filename: 2.ts
import * as foo from './1'
foo.ns.a;
foo.ns.... | {
"end_byte": 322,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace3.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace_exportAssignment.ts_0_154 | // @module: commonjs
// @esModuleInterop: true
// @noTypesAndSymbols: true
// @Filename: a.ts
export = {}
// @Filename: b.ts
export * as ns from './a';
| {
"end_byte": 154,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace_exportAssignment.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace2.ts_0_288 | // @module: esnext, es2015, commonjs, amd, system, umd
// @filename: 0.ts
// @declaration: true
// @esModuleInterop: true
export const a = 1;
export const b = 2;
// @filename: 1.ts
export * as ns from './0';
ns.a;
ns.b;
// @filename: 2.ts
import * as foo from './1'
foo.ns.a;
foo.ns.b; | {
"end_byte": 288,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace2.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace5.ts_0_261 | // @module: esnext
// @moduleResolution: bundler
// @filename: three.d.ts
export type Named = 0;
declare const Named: 0;
// @filename: two.d.ts
export * as default from "./three";
// @filename: one.ts
import ns from "./two";
type Alias = ns.Named;
ns.Named;
| {
"end_byte": 261,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace5.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace_missingEmitHelpers.ts_0_185 | // @module: commonjs
// @importHelpers: true
// @esModuleInterop: true
// @noTypesAndSymbols: true
// @Filename: a.ts
export {}
// @Filename: b.ts
export * as ns from './a'; // Error
| {
"end_byte": 185,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace_missingEmitHelpers.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace1.ts_0_262 | // @module: esnext, es2015, commonjs, amd, system, umd
// @filename: 0.ts
// @declaration: true
export const a = 1;
export const b = 2;
// @filename: 1.ts
export * as ns from './0';
ns.a;
ns.b;
// @filename: 2.ts
import * as foo from './1'
foo.ns.a;
foo.ns.b; | {
"end_byte": 262,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace1.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace4.ts_0_378 | // @module: esnext, es2015, commonjs, amd, system, umd
// @filename: 0.ts
// @declaration: true
// @esModuleInterop: true
export const a = 1;
export const b = 2;
// @filename: 1.ts
export * as default from './0';
// @filename: 11.ts
import * as ns from './0';
export default ns;
// @filename: 2.ts
import foo from './... | {
"end_byte": 378,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace4.ts"
} |
TypeScript/tests/cases/conformance/es2020/modules/exportAsNamespace_nonExistent.ts_0_94 | // @module: esnext
// @noTypesAndSymbols: true
export * as ns from './nonexistent'; // Error
| {
"end_byte": 94,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2020/modules/exportAsNamespace_nonExistent.ts"
} |
TypeScript/tests/cases/conformance/es2018/es2018IntlAPIs.ts_0_435 | // @target: es2018
// Sample from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/supportedLocalesOf
const locales = ['ban', 'id-u-co-pinyin', 'de-ID'];
const options = { localeMatcher: 'lookup' } as const;
console.log(Intl.PluralRules.supportedLocalesOf(locales, op... | {
"end_byte": 435,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2018/es2018IntlAPIs.ts"
} |
TypeScript/tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts_0_1008 | // @target: ES5, ES2015, esnext
function tag (str: any, ...args: any[]): any {
return str
}
const a = tag`123`
const b = tag`123 ${100}`
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should er... | {
"end_byte": 1008,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts"
} |
TypeScript/tests/cases/conformance/es2018/useRegexpGroups.ts_0_375 | // @target: es2018
// @lib: es6,es2018
let re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/u;
let result = re.exec("2015-01-02");
let date = result[0];
let year1 = result.groups.year;
let year2 = result[1];
let month1 = result.groups.month;
let month2 = result[2];
let day1 = result.groups.day;
let day2 = result... | {
"end_byte": 375,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2018/useRegexpGroups.ts"
} |
TypeScript/tests/cases/conformance/es2018/usePromiseFinally.ts_0_135 | // @target: es5
// @lib: es6,es2018
let promise1 = new Promise(function(resolve, reject) {})
.finally(function() {});
| {
"end_byte": 135,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2018/usePromiseFinally.ts"
} |
TypeScript/tests/cases/conformance/es2016/es2016IntlAPIs.ts_0_482 | // @target: es2016
// Sample from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
console.log(Intl.getCanonicalLocales('EN-US'));
// Expected output: Array ["en-US"]
console.log(Intl.getCanonicalLocales(['EN-US', 'Fr']));
// Expected output: Array ["en-US",... | {
"end_byte": 482,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2016/es2016IntlAPIs.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes1.ts_0_840 | // @declaration: true
// @target: es2015
// @module: es2015, commonjs, esnext
// @filename: 0.ts
export const a = 1;
export const b = 2;
// @filename: 1.ts
import './0' with { type: "json" }
import { a, b } from './0' with { "type": "json" }
import * as foo from './0' with { type: "json" }
a;
b;
foo.a;
foo.b;
// @fil... | {
"end_byte": 840,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes1.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes7.ts_0_291 | // @module: esnext
// @lib: es2015
// @filename: /a.ts
export default {
a: "a",
b: "b",
1: "1",
}
// @filename: /b.ts
import a from "./a" with { a: "a", "b": "b" };
export async function f() {
const a = import("./a", {
with: { a: "a", "b": "b" },
});
a;
}
| {
"end_byte": 291,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes7.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes3.ts_0_356 | // @declaration: true
// @target: es2015
// @module: es2015, esnext
// @filename: 0.ts
export interface I { }
// @filename: 1.ts
export type {} from './0' with { type: "json" }
export type { I } from './0' with { type: "json" }
// @filename: 2.ts
import type { I } from './0' with { type: "json" }
import type * as f... | {
"end_byte": 356,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes3.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes2.ts_0_464 | // @declaration: true
// @target: es2015
// @module: es2015, commonjs, esnext
// @filename: 0.ts
export const a = 1;
export const b = 2;
// @filename: 1.ts
export {} from './0' with { type: "json" }
export { a, b } from './0' with { type: "json" }
export * from './0' with { type: "json" }
export * as ns from './0' wi... | {
"end_byte": 464,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes2.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes6.ts_0_415 | // @module: nodenext
// @filename: mod.mts
import * as thing1 from "./mod.mjs" with { field: 0 };
import * as thing2 from "./mod.mjs" with { field: `a` };
import * as thing3 from "./mod.mjs" with { field: /a/g };
import * as thing4 from "./mod.mjs" with { field: ["a"] };
import * as thing5 from "./mod.mjs" with { field... | {
"end_byte": 415,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes6.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes9.ts_0_358 | // @module: esnext
// @target: esnext
// @filename: ./a.ts
export default {};
// @filename: ./b.ts
declare global {
interface ImportAttributes {
type: "json"
}
}
import * as ns from "./a" with { type: "not-json" };
void ns;
async function f() {
await import("./a", {
with: {
t... | {
"end_byte": 358,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes9.ts"
} |
TypeScript/tests/cases/conformance/importAttributes/importAttributes8.ts_0_173 | // @module: esnext
// @lib: es2015
// @filename: /a.ts
export default {
a: "a",
b: "b",
}
// @filename: /b.ts
import a from "./a" with { a: "a", "b": "b" }; // ok
| {
"end_byte": 173,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAttributes/importAttributes8.ts"
} |
TypeScript/tests/cases/conformance/importAssertion/importAssertion2.ts_0_476 | // @declaration: true
// @target: es2015
// @module: es2015, commonjs, esnext
// @filename: 0.ts
export const a = 1;
export const b = 2;
// @filename: 1.ts
export {} from './0' assert { type: "json" }
export { a, b } from './0' assert { type: "json" }
export * from './0' assert { type: "json" }
export * as ns from '.... | {
"end_byte": 476,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAssertion/importAssertion2.ts"
} |
TypeScript/tests/cases/conformance/importAssertion/importAssertion3.ts_0_365 | // @declaration: true
// @target: es2015
// @module: es2015, esnext
// @filename: 0.ts
export interface I { }
// @filename: 1.ts
export type {} from './0' assert { type: "json" }
export type { I } from './0' assert { type: "json" }
// @filename: 2.ts
import type { I } from './0' assert { type: "json" }
import type ... | {
"end_byte": 365,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAssertion/importAssertion3.ts"
} |
TypeScript/tests/cases/conformance/importAssertion/importAssertion1.ts_0_861 | // @declaration: true
// @target: es2015
// @module: es2015, commonjs, esnext
// @filename: 0.ts
export const a = 1;
export const b = 2;
// @filename: 1.ts
import './0' assert { type: "json" }
import { a, b } from './0' assert { "type": "json" }
import * as foo from './0' assert { type: "json" }
a;
b;
foo.a;
foo.b;
... | {
"end_byte": 861,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/importAssertion/importAssertion1.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer3.ts_0_112 | // @target: es6
var foge = new SharedArrayBuffer(1024);
var bar = foge.slice(1, 10);
var len = foge.byteLength; | {
"end_byte": 112,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer3.ts"
} |
TypeScript/tests/cases/conformance/es2017/useObjectValuesAndEntries2.ts_0_139 | // @target: es5
// @lib: es5
var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
let y = x;
}
var entries = Object.entries(o); | {
"end_byte": 139,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useObjectValuesAndEntries2.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer6.ts_0_159 | // @target: es5
// @lib: es6,es2017.sharedmemory
var foge = new SharedArrayBuffer(1024);
foge.length; // should error
var length = SharedArrayBuffer.length;
| {
"end_byte": 159,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer6.ts"
} |
TypeScript/tests/cases/conformance/es2017/useObjectValuesAndEntries3.ts_0_126 | // @target: es6
var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
let y = x;
}
var entries = Object.entries(o); | {
"end_byte": 126,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useObjectValuesAndEntries3.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer2.ts_0_125 | // @target: es5
// @lib: es5
var foge = new SharedArrayBuffer(1024);
var bar = foge.slice(1, 10);
var len = foge.byteLength; | {
"end_byte": 125,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer2.ts"
} |
TypeScript/tests/cases/conformance/es2017/es2017DateAPIs.ts_0_32 | // @lib: es2017
Date.UTC(2017); | {
"end_byte": 32,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/es2017DateAPIs.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer5.ts_0_167 | // @target: es5
// @lib: es6,es2017.sharedmemory
var foge = new SharedArrayBuffer(1024);
var species = foge[Symbol.species];
var stringTag = foge[Symbol.toStringTag]; | {
"end_byte": 167,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer5.ts"
} |
TypeScript/tests/cases/conformance/es2017/useObjectValuesAndEntries4.ts_0_142 | // @target: es6
// @lib: es2017
var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
let y = x;
}
var entries = Object.entries(o); | {
"end_byte": 142,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useObjectValuesAndEntries4.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer1.ts_0_145 | // @target: es5
// @lib: es5,es2017.sharedmemory
var foge = new SharedArrayBuffer(1024);
var bar = foge.slice(1, 10);
var len = foge.byteLength; | {
"end_byte": 145,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer1.ts"
} |
TypeScript/tests/cases/conformance/es2017/useSharedArrayBuffer4.ts_0_206 | // @target: es6
// @lib: es2017
var foge = new SharedArrayBuffer(1024);
var bar = foge.slice(1, 10);
var species = foge[Symbol.species];
var stringTag = foge[Symbol.toStringTag];
var len = foge.byteLength; | {
"end_byte": 206,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useSharedArrayBuffer4.ts"
} |
TypeScript/tests/cases/conformance/es2017/useObjectValuesAndEntries1.ts_0_1156 | // @target: es5
// @lib: es5,es2017.object
var o = { a: 1, b: 2 };
for (var x of Object.values(o)) {
let y = x;
}
var entries = Object.entries(o); // [string, number][]
var values = Object.values(o); // number[]
var entries1 = Object.entries(1); // [stri... | {
"end_byte": 1156,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/es2017/useObjectValuesAndEntries1.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsLookupAmd.ts_0_328 | // @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// @module: amd
// @filename: /node_modules/@types/a/index.d.ts
export declare class A {}
// @filename: /x/node_modules/@types/b/index.d.ts
import {A} from "a";
export declare class B extends A {}
// @filename: /x/y/foo.ts
import {B} fr... | {
"end_byte": 328,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsLookupAmd.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsSuggestionBun2.ts_0_106 | // @filename: tsconfig.json
{ "compilerOptions": {} }
// @filename: a.ts
const file = Bun.file("/a.ts");
| {
"end_byte": 106,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsSuggestionBun2.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsSuggestion1.ts_0_105 | // @filename: tsconfig.json
{ "compilerOptions": {"types": []} }
// @filename: a.ts
module.exports = 1;
| {
"end_byte": 105,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsSuggestion1.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsLookup3.ts_0_329 | // @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// This tests that `types` references are not lowercased.
// @filename: /tsconfig.json
{ "files": "a.ts" }
// @filename: /node_modules/@types/jquery/index.d.ts
declare var $: { x: any };
// @filename: /a.ts
/// <reference types="JqUeRy"... | {
"end_byte": 329,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsLookup3.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsLookup2.ts_0_385 | // @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// This tests that an @types package with `"typings": null` is not automatically included.
// (If it were, this test would break because there are no typings to be found.)
// @filename: /tsconfig.json
{}
// @filename: /node_modules/@type... | {
"end_byte": 385,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsLookup2.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsLookup1.ts_0_271 | // @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// @filename: /tsconfig.json
{ "files": "a.ts" }
// @filename: /node_modules/@types/jquery/index.d.ts
declare var $: { x: any };
// @filename: /a.ts
/// <reference types="jquery" />
$.x;
| {
"end_byte": 271,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsLookup1.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsSuggestionBun1.ts_0_117 | // @filename: tsconfig.json
{ "compilerOptions": {"types": []} }
// @filename: a.ts
const file = Bun.file("/a.ts");
| {
"end_byte": 117,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsSuggestionBun1.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsLookup4.ts_0_965 | // @traceResolution: true
// @noImplicitReferences: true
// @currentDirectory: /
// @jsx: react
// A file extension is optional in typings entries.
// @filename: /tsconfig.json
{}
// @filename: /node_modules/@types/jquery/package.json
{ "typings": "jquery.d.ts" }
// @filename: /node_modules/@types/jquery/jquery.d.ts... | {
"end_byte": 965,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsLookup4.ts"
} |
TypeScript/tests/cases/conformance/typings/typingsSuggestion2.ts_0_94 | // @filename: tsconfig.json
{ "compilerOptions": {} }
// @filename: a.ts
module.exports = 1;
| {
"end_byte": 94,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/typings/typingsSuggestion2.ts"
} |
TypeScript/tests/cases/conformance/async/asyncFunctionDeclarationParameterEvaluation.ts_0_1587 | // @target: es2015,es2017
// @lib: esnext
// @noEmitHelpers: true
// @noTypesAndSymbols: true
// https://github.com/microsoft/TypeScript/issues/40410
async function f1(x, y = z) {}
async function f2({[z]: x}) {}
async function f3(x = z) { return async () => arguments; }
async function f4(x = z) { return async () => as... | {
"end_byte": 1587,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/asyncFunctionDeclarationParameterEvaluation.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncMultiFile_es5.ts_0_120 | // @target: es5
// @lib: es5,es2015.promise
// @filename: a.ts
async function f() {}
// @filename: b.ts
function g() { } | {
"end_byte": 120,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncMultiFile_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncModule_es5.ts_0_86 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
async module M {
} | {
"end_byte": 86,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncModule_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/awaitClassExpression_es5.ts_0_201 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
declare class C { }
declare var p: Promise<typeof C>;
async function func(): Promise<void> {
class D extends (await p) {
}
} | {
"end_byte": 201,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/awaitClassExpression_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts_0_183 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
namespace X {
export class MyPromise<T> extends Promise<T> {
}
}
async function f(): X.MyPromise<void> {
} | {
"end_byte": 183,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncAwait_es5.ts_0_1077 | // @target: ES5
// @lib: es5,es2015.promise
type MyPromise<T> = Promise<T>;
declare var MyPromise: typeof Promise;
declare var p: Promise<number>;
declare var mp: MyPromise<number>;
async function f0() { }
async function f1(): Promise<void> { }
async function f3(): MyPromise<void> { }
let f4 = async function() { }
le... | {
"end_byte": 1077,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncAwait_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncGetter_es5.ts_0_103 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class C {
async get foo() {
}
} | {
"end_byte": 103,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncGetter_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncImportedPromise_es5.ts_0_243 | // @target: es5
// @lib: es5,es2015.promise
// @module: commonjs
// @filename: task.ts
export class Task<T> extends Promise<T> { }
// @filename: test.ts
import { Task } from "./task";
class Test {
async example<T>(): Task<T> { return; }
} | {
"end_byte": 243,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncImportedPromise_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts_0_416 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
// https://github.com/Microsoft/TypeScript/issues/20744
class A {
static B = class B {
static func2(): Promise<void> {
return new Promise((resolve) => { resolve(null); });
}
static C = class C {
stati... | {
"end_byte": 416,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncClass_es5.ts_0_85 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
async class C {
} | {
"end_byte": 85,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncClass_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts_0_987 | // @target: ES5
// @lib: es5,es2015.promise
// @isolatedModules: true
import { MyPromise } from "missing";
declare var p: Promise<number>;
declare var mp: MyPromise<number>;
async function f0() { }
async function f1(): Promise<void> { }
async function f3(): MyPromise<void> { }
let f4 = async function() { }
let f5 = ... | {
"end_byte": 987,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts_0_1212 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class A {
x() {
}
y() {
}
}
class B extends A {
// async method with only call/get on 'super' does not require a binding
async simple() {
// call with property access
super.x();
// call additional proper... | {
"end_byte": 1212,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncSetter_es5.ts_0_108 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class C {
async set foo(value) {
}
} | {
"end_byte": 108,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncSetter_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncEnum_es5.ts_0_92 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
async enum E {
Value
} | {
"end_byte": 92,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncEnum_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncDeclare_es5.ts_0_112 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
declare async function foo(): Promise<void>; | {
"end_byte": 112,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncDeclare_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/awaitUnion_es5.ts_0_444 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
declare let a: number | string;
declare let b: PromiseLike<number> | PromiseLike<string>;
declare let c: PromiseLike<number | string>;
declare let d: number | PromiseLike<string>;
declare let e: number | PromiseLike<number | string>;
async function f()... | {
"end_byte": 444,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/awaitUnion_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncInterface_es5.ts_0_89 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
async interface I {
} | {
"end_byte": 89,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncInterface_es5.ts"
} |
TypeScript/tests/cases/conformance/async/es5/asyncConstructor_es5.ts_0_107 | // @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class C {
async constructor() {
}
} | {
"end_byte": 107,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/async/es5/asyncConstructor_es5.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.