_id
stringlengths
21
254
text
stringlengths
1
93.7k
metadata
dict
TypeScript/tests/cases/conformance/externalModules/typeOnly/circular2.ts_0_157
// @noEmit: true // @Filename: /a.ts import type { B } from './b'; export type A = B; // @Filename: /b.ts import type { A } from './a'; export type B = A;
{ "end_byte": 157, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/circular2.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/chained2.ts_0_375
// @Filename: /a.ts class A { a!: string } export type { A as default }; // @Filename: /b.ts import A from './a'; import type { default as B } from './a'; export { A, B }; // @Filename: /c.ts import * as types from './b'; export { types as default }; // @Filename: /d.ts import types from './c'; new types.A(); new ty...
{ "end_byte": 375, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/chained2.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace6.ts_0_253
// @Filename: /a.ts export class A {} export class B {} // @Filename: /b.ts export type * from "./a"; // @Filename: /c.ts export * from "./b"; // @Filename: /d.ts import { A, B } from "./c"; let _: A = new A(); // Error let __: B = new B(); // Error
{ "end_byte": 253, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace6.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace12.ts_0_298
// @filename: main.ts import { c } from './types' import * as types from './types' console.log(c) // Fails as expected, import is still allowed though. console.log(types.c) // Expected an error here. // @filename: types.ts export type * from './values' // @filename: values.ts export const c = 10
{ "end_byte": 298, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace12.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/circular3.ts_0_167
// @noEmit: true // @Filename: /a.ts import type { A } from './b'; export type { A as B }; // @Filename: /b.ts import type { B } from './a'; export type { B as A };
{ "end_byte": 167, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/circular3.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/namespaceMemberAccess.ts_0_142
// @Filename: /a.ts class A { a!: string } export type { A }; // @Filename: /b.ts import * as types from './a'; types.A; const { A } = types;
{ "end_byte": 142, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/namespaceMemberAccess.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts_0_212
// @Filename: a.ts export class A {} // @Filename: b.ts export * as a from './a'; // @Filename: c.ts import type { a } from './b'; export { a }; // @Filename: d.ts import { a } from './c'; new a.A(); // Error
{ "end_byte": 212, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace2.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts_0_477
// @module: nodenext // @Filename: module.mts export {}; // @Filename: common.cts import type {} from "./module.mts"; import type {} from "./module.mts" with { "resolution-mode": "import" }; import type {} from "./module.mts" with { "resolution-mode": "require" }; type _1 = typeof import("./module.mts"); type _2 = ty...
{ "end_byte": 477, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/typeOnlyESMImportFromCJS.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportDeclaration_moduleSpecifier.ts_0_164
// @Filename: /a.ts export class A {} // @Filename: /b.ts export type { A } from './a'; // @Filename: /c.ts import { A } from './b'; declare const a: A; new A();
{ "end_byte": 164, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportDeclaration_moduleSpecifier.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace5.ts_0_519
// @declaration: true // @Filename: /a.ts export class A {} export class B {} export class X {} // @Filename: /b.ts export type * from "./a"; export { X } from "./a"; // @Filename: /c.ts import { A, B as C, X } from "./b"; let _: A = new A(); // Error let __: C = new C(); // Error let ___: X = new X(); // Ok // ...
{ "end_byte": 519, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace5.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace11.ts_0_233
// @filename: main.ts import * as intermediate from './intermediate' const ghost: intermediate.Ghost = new intermediate.Ghost() // @filename: intermediate.ts export type * from './ghost' // @filename: ghost.ts export class Ghost {}
{ "end_byte": 233, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace11.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType2.ts_0_96
// @Filename: /a.ts export default class A {} // @Filename: /b.ts import type from from './a';
{ "end_byte": 96, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType2.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/allowsImportingTsExtension.ts_0_608
// @allowImportingTsExtensions: false // @target: esnext // @module: esnext // @Filename: a.ts export class A {} // @Filename: a.d.ts export class A {} // @Filename: b.ts import type { A } from "./a.ts"; // ok import {} from "./a.ts"; // error import { type A as _A } from "./a.ts"; // error type __A = import("./a.ts...
{ "end_byte": 608, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/allowsImportingTsExtension.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts_0_191
// @Filename: a.ts export class A {} // @Filename: b.ts export type { A } from './a'; // @Filename: c.ts export * from './b'; // @Filename: d.ts import { A } from './c'; new A(); // Error
{ "end_byte": 191, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace1.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importClause_namespaceImport.ts_0_321
// @Filename: /a.ts export class A { a!: string } export class B { b!: number } export type C<T> = T; export const Value = {}; // @Filename: /b.ts import type * as types from './a'; types; types.Value; let v: types.Value; const a: types.A = {}; const b: types.B = {}; const c: types.C<string> = ""; const d = { types };...
{ "end_byte": 321, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importClause_namespaceImport.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportSpecifiers_js.ts_0_111
// @allowJs: true // @checkJs: true // @noEmit: true // @Filename: ./a.js const foo = 0; export { type foo };
{ "end_byte": 111, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportSpecifiers_js.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/ambient.ts_0_178
// @Filename: /a.ts export class A { a!: string } // @Filename: /b.ts import type { A } from './a'; declare class B extends A {} declare namespace ns { class C extends A {} }
{ "end_byte": 178, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/ambient.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts_0_1003
// @preserveValueImports: true // @isolatedModules: true,false // @module: esnext // @Filename: a.ts export type A = {}; export type { A as default }; // @Filename: b.ts class B {}; export type { B, B as default }; // @Filename: c.ts import DefaultA from "./a"; import { A } from "./a"; import DefaultB from "./b"; im...
{ "end_byte": 1003, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_errors.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/circular4.ts_0_305
// @noEmit: true // @Filename: /a.ts import type { ns2 } from './b'; export namespace ns1 { export namespace nested { export type T = ns2.nested.T; } } // @Filename: /b.ts import type { ns1 } from './a'; export namespace ns2 { export namespace nested { export type T = ns1.nested.T; } }
{ "end_byte": 305, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/circular4.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts_0_109
// @preserveValueImports: true // @module: amd,system,commonjs,es2015 // @noTypesAndSymbols: true export {};
{ "end_byte": 109, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_module.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/generic.ts_0_252
// @Filename: /a.ts export class A<T> { a!: T } export type { A as B }; // @Filename: /b.ts import type { A } from './a'; import { B } from './a'; let a: A<string> = { a: "" }; let b: B<number> = { a: 3 }; let c: A<boolean> = {}; let d: B = { a: "" };
{ "end_byte": 252, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/generic.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/grammarErrors.ts_0_356
// @noTypesAndSymbols: true // @allowJs: true // @checkJs: true // @Filename: /a.ts export default class A {} export class B {} export class C {} // @Filename: /b.ts import type A, { B, C } from './a'; // @Filename: /a.js import type A from './a'; export type { A }; // @Filename: /c.ts namespace ns { export class...
{ "end_byte": 356, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/grammarErrors.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportDeclaration.ts_0_300
// @module: commonjs // @isolatedModules: false, true // @Filename: /a.ts class A {} export type { A }; // @Filename: /b.ts import { A } from './a'; declare const a: A; new A(); // @Filename: /c.ts import type { A } from './a'; export = A; // @Filename: /d.ts import { A } from './a'; export = A;
{ "end_byte": 300, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportDeclaration.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importEqualsDeclaration.ts_0_385
// @noTypesAndSymbols: true // @declaration: true // @Filename: /a.ts class A { a!: string } export = A; // @Filename: /b.ts class SomeClass {} export = SomeClass; // @Filename: /c.ts import type A = require('./a'); // Ok import type = require('./b'); // Ok A.prototype; // Error const a: A = { a: 'a' }; // Ok voi...
{ "end_byte": 385, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importEqualsDeclaration.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/nestedNamespace.ts_0_150
// @Filename: a.ts export namespace types { export class A {} } // @Filename: b.ts import type * as a from './a'; interface B extends a.types.A {}
{ "end_byte": 150, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/nestedNamespace.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/filterNamespace_import.ts_0_392
// @Filename: /ns.ts namespace ns { export type Type = string; export class Class {} export const Value = ""; export namespace nested { export class NestedClass { a!: string; } } } export default ns; // @Filename: /a.ts import type ns from './ns'; ns.Class; // Error ns.Value; // Error let c: n...
{ "end_byte": 392, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/filterNamespace_import.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts_0_258
// @declaration: true // @Filename: a.ts export class A {} // @Filename: b.ts export type * from './a'; // @Filename: c.ts export type * as ns from './a'; // @Filename: d.ts import { A } from './b'; A; // @Filename: e.ts import { ns } from './c'; ns.A;
{ "end_byte": 258, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace4.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/circular1.ts_0_119
// @noEmit: true // @Filename: /a.ts export type { A } from './b'; // @Filename: /b.ts export type { A } from './a';
{ "end_byte": 119, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/circular1.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace10.ts_0_172
// @Filename: /a.ts export class A {} // @Filename: /b.ts export type * as ns from "./a"; // @Filename: /c.ts import { ns } from "./b"; let _: ns.A = new ns.A(); // Error
{ "end_byte": 172, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace10.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType3.ts_0_94
// @Filename: /a.ts export class A {} // @Filename: /b.ts import type from = require('./a');
{ "end_byte": 94, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType3.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts_0_472
// @preserveValueImports: true // @isolatedModules: true,false // @module: esnext // @Filename: a.ts export default {}; export const b = 0; export const c = 1; export interface D {} // @Filename: b.ts import a, { b, c, D } from "./a"; // @Filename: c.ts import * as a from "./a"; // @Filename: d.ts export = {}; // ...
{ "end_byte": 472, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/preserveValueImports.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/namespaceImportTypeQuery4.ts_0_241
// @Filename: /a.ts import type { A } from './z'; // unresolved type A = 0; export { A }; export class B {}; // @Filename: /b.ts import * as types from './a'; let t: typeof types = { A: undefined as any, // error B: undefined as any, }
{ "end_byte": 241, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/namespaceImportTypeQuery4.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importEquals1.ts_0_508
// @esModuleInterop: true // @Filename: /a.ts export class A {} // @Filename: /b.ts import type * as types from './a'; export = types; // Error // @Filename: /c.ts import * as types from './a'; export = types; // @Filename: /d.ts import types from './b'; new types.A(); // Error // @Filename: /e.ts import types = r...
{ "end_byte": 508, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importEquals1.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts_0_334
// @preserveValueImports: true // @importsNotUsedAsValues: preserve // @module: esnext // @Filename: /mod.ts export type A = unknown; export type B = never; export type C = any; // @Filename: /index.ts import { type A, type B, type C } from "./mod.js"; // @Filename: /reexport.ts export { type A, type B, type C } fro...
{ "end_byte": 334, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_importsNotUsedAsValues.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/computedPropertyName.ts_0_586
// @target: esnext // @useDefineForClassFields: false // @Filename: framework-hooks.ts export const onInit = Symbol("onInit"); // @Filename: component.ts import type { onInit } from "./framework-hooks"; interface Component { [onInit]?(): void; } type T = { [onInit]: any; } const o = { [onInit]: 0 // Error };...
{ "end_byte": 586, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/computedPropertyName.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts_0_346
// @preserveValueImports: true // @isolatedModules: true // @module: es2015 // @Filename: /exports.ts export function Component() {} export interface ComponentProps {} // @Filename: /index.ts import { Component, ComponentProps } from "./exports.js"; // @Filename: /index.fixed.ts import { Component, type ComponentPro...
{ "end_byte": 346, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/preserveValueImports_mixedImports.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/namespaceImportTypeQuery.ts_0_332
// @Filename: /a.ts class A {} export type { A }; export class B {}; // @Filename: /b.ts import * as types from './a'; let A: typeof types.A; let B: typeof types.B; let t: typeof types = { // error: while you can ask for `typeof types.A`, // `typeof types` does not include `A` A: undefined as any, B: undefine...
{ "end_byte": 332, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/namespaceImportTypeQuery.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportDeclaration_moduleSpecifier-isolatedModules.ts_0_164
// @isolatedModules: true // @Filename: /a.ts export type A = {}; // @Filename: /b.ts export type { A } from './a'; // should not error, but would without `type`
{ "end_byte": 164, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportDeclaration_moduleSpecifier-isolatedModules.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts_0_1288
// @importsNotUsedAsValues: error // @noUnusedLocals: true // @Filename: /a.ts export default class {} export class A {} export type B = {}; export const enum C { One, Two } // @Filename: /b.ts import { A, B } from './a'; // Error let a: A; let b: B; console.log(a, b); // @Filename: /c.ts import Default, * as named ...
{ "end_byte": 1288, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importsNotUsedAsValues_error.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/typeQuery.ts_0_118
// @Filename: /a.ts export class A { } // @Filename: /b.ts import type { A } from './a'; let AConstructor: typeof A;
{ "end_byte": 118, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/typeQuery.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportDefault.ts_0_519
// @esModuleInterop: true // @Filename: /a.ts export class A {} // @Filename: /b.ts import type * as types from './a'; export default types; // @Filename: /c.ts import * as types from './a'; export default types; // @Filename: /d.ts import types from './b'; new types.A(); // Error // @Filename: /e.ts import types ...
{ "end_byte": 519, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportDefault.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/extendsClause.ts_0_412
// @Filename: types.ts export interface I {} export class C {} // @Filename: ns.ts import type * as types from './types'; export { types }; // @Filename: index.ts import { types } from './ns'; import type { C, I } from './types'; interface Q extends C {} interface R extends I {} interface S extends types.C {} interf...
{ "end_byte": 412, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/extendsClause.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/enums.ts_0_564
// @Filename: /a.ts enum SyntaxKind { ImportClause, ExportDeclaration } const enum SymbolFlags { Type = "Type", Value = "Value" } export type { SyntaxKind }; export { SymbolFlags }; // @Filename: /b.ts import type { SyntaxKind, SymbolFlags } from './a'; SyntaxKind.ImportClause; SymbolFlags.Type; let kind: S...
{ "end_byte": 564, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/enums.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts_0_1249
// @module: esnext // @declaration: true // @Filename: /mod.ts export const as = 0; export const type = 0; export const something = 0; // @Filename: /a.ts import { type } from "./mod.js"; import { type as } from "./mod.js"; type; as; // Error (used in emitting position) // @Filename: /b.ts import { type as as } from...
{ "end_byte": 1249, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importSpecifiers1.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/exportNamespace_js.ts_0_206
// @declaration: true // @outDir: out // @checkJs: true // @allowJs: true // @Filename: a.js export class A {} // @Filename: b.js export type * from './a'; // @Filename: c.js import { A } from './b'; A;
{ "end_byte": 206, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/exportNamespace_js.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/cjsImportInES2015.ts_0_292
// @module: es2015 // @moduleResolution: node // @Filename: /project/node_modules/cjs-dep/index.d.ts declare class SpecialError extends Error {} export = SpecialError; // @Filename: /project/index.ts import type SpecialError = require("cjs-dep"); function handleError(err: SpecialError) {}
{ "end_byte": 292, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/cjsImportInES2015.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/renamed.ts_0_213
// @strict: true // @Filename: /a.ts class A { a!: string } export type { A as B }; // @Filename: /b.ts export type { B as C } from './a'; // @Filename: /c.ts import type { C as D } from './b'; const d: D = {};
{ "end_byte": 213, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/renamed.ts" }
TypeScript/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType.ts_0_91
// @Filename: /a.ts export default class A {} // @Filename: /b.ts import type from './a';
{ "end_byte": 91, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/typeOnly/importDefaultNamedType.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/exnextmodulekindExportClassNameWithObject.ts_0_58
// @target: ES5 // @module: esnext export class Object {}
{ "end_byte": 58, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/exnextmodulekindExportClassNameWithObject.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target5.ts_0_131
// @target: es5 // @module: esnext // @preserveConstEnums: true export enum E1 { value1 } export const enum E2 { value1 }
{ "end_byte": 131, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target5.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target4.ts_0_65
// @target: es5 // @module: esnext class E { } export default E;
{ "end_byte": 65, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target4.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target12.ts_0_401
// @target: es5 // @module: esnext export class C { } export namespace C { export const x = 1; } export enum E { w = 1 } export enum E { x = 2 } export namespace E { export const y = 1; } export namespace E { export const z = 1; } export namespace N { } export namespace N { export const ...
{ "end_byte": 401, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target12.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target.ts_0_313
// @target: es5 // @module: esnext // @experimentalDecorators: true export class C { static s = 0; p = 1; method() { } } export { C as C2 }; declare function foo(...args: any[]): any; @foo export class D { static s = 0; p = 1; method() { } } export { D as D2 }; class E { } export {E};
{ "end_byte": 313, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekind.ts_0_185
// @target: ES6 // @sourcemap: false // @declaration: false // @module: esnext export default class A { constructor () { } public B() { return 42; } }
{ "end_byte": 185, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekind.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target7.ts_0_126
// @target: es5 // @module: esnext export namespace N { var x = 0; } export namespace N2 { export interface I { } }
{ "end_byte": 126, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target7.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target3.ts_0_190
// @target: es5 // @module: esnext // @experimentalDecorators: true declare function foo(...args: any[]): any; @foo export default class D { static s = 0; p = 1; method() { } }
{ "end_byte": 190, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target3.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target11.ts_0_219
// @target: es5 // @module: esnext // @experimentalDecorators: true declare function foo(...args: any[]): any; @foo export default class C { static x() { return C.y; } static y = 1 p = 1; method() { } }
{ "end_byte": 219, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target11.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES2015Target.ts_0_185
// @target: es2015 // @sourcemap: false // @declaration: false // @module: es6 export default class A { constructor () { } public B() { return 42; } }
{ "end_byte": 185, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES2015Target.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target2.ts_0_109
// @target: es5 // @module: esnext export default class C { static s = 0; p = 1; method() { } }
{ "end_byte": 109, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target2.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts_0_111
// @target: es5 // @module: esnext import i = require("mod"); // Error; namespace N { } export = N; // Error
{ "end_byte": 111, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target6.ts_0_137
// @target: es5 // @module: esnext export function f1(d = 0) { } export function f2(...arg) { } export default function f3(d = 0) { }
{ "end_byte": 137, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target6.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts_0_211
// @target: es5 // @module: esnext import d from "mod"; import {a} from "mod"; import * as M from "mod"; export {a}; export {M}; export {d}; export * from "mod"; export {b} from "mod" export default d;
{ "end_byte": 211, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts" }
TypeScript/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target8.ts_0_73
// @target: es5 // @module: esnext export const c = 0; export let l = 1;
{ "end_byte": 73, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target8.ts" }
TypeScript/tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts_0_530
function fn() { catch(x) { } // error missing try finally { } // potential error; can be absorbed by the 'catch' try { }; // error missing finally } function fn2() { finally { } // error missing try catch (x) { } // error missing try try { } finally { } // statement is here, so the 'catc...
{ "end_byte": 530, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/tryStatements/invalidTryStatements.ts" }
TypeScript/tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts_0_1703
type any1 = any; type unknown1 = unknown; function fn(x: boolean) { // no type annotation allowed other than `any` and `unknown` try { } catch (x) { } // should be OK try { } catch (x: any) { } // should be OK try { } catch (x: any1) { } // should be OK try { } catch (x: unknown) { } // should be ...
{ "end_byte": 1703, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts" }
TypeScript/tests/cases/conformance/statements/tryStatements/tryStatements.ts_1_297
function fn() { try { } catch { } try { } catch { try { } catch { try { } catch { } } try { } catch { } } try { } catch (x) { var x: any; } try { } finally { } try { } catch { } finally { } try { } catch (z) { } finally { } }
{ "end_byte": 297, "start_byte": 1, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/tryStatements/tryStatements.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts_0_872
// all expected to be valid var x: number; var x = 2; if (true) { var x = 3; for (var x = 0; ;) { } } var x = <number>undefined; // new declaration space, making redeclaring x as a string valid function declSpace() { var x = 'this is a string'; } interface Point { x: number; y: number; } var p: Point; v...
{ "end_byte": 872, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/validMultipleVariableDeclarations.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts_0_791
interface I { id: number; } class C implements I { id: number; } class D<T>{ source: T; recurse: D<T>; wrapped: D<D<T>> } function F(x: string): number { return 42; } module M { export class A { name: string; } export function F2(x: number): string { return x.toString(); } }...
{ "end_byte": 791, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts_0_981
interface I { id: number; } class C implements I { id: number; } class D<T>{ source: T; recurse: D<T>; wrapped: D<D<T>> } function F(x: string): number { return 42; } module M { export class A { name: string; } export function F2(x: number): string { return x.toString(); } }...
{ "end_byte": 981, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts_0_780
interface I { id: number; } class C implements I { id: number; valid: boolean; } class C2 extends C { name: string; } class D<T>{ source: T; recurse: D<T>; wrapped: D<D<T>> } function F(x: string): number { return 42; } module M { export class A { name: string; } ex...
{ "end_byte": 780, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts_0_1041
interface I { id: number; } class C implements I { id: number; } class D<T>{ source: T; recurse: D<T>; wrapped: D<D<T>> } function F(x: string): number { return 42; } function F2(x: number): boolean { return x < 42; } module M { export class A { name: string; } export functi...
{ "end_byte": 1041, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/recursiveInitializer.ts_0_477
// number unless otherwise specified var n1 = n1++; var n2: number = n2 + n2; var n3 /* any */ = n3 + n3; // string unless otherwise specified var s1 = s1 + ''; var s2 /* any */ = s2 + s2; var s3 : string = s3 + s3; var s4 = '' + s4; // boolean unless otherwise specified var b1 = !b1; var b2 = !!b2; var b3 = !b3 || b...
{ "end_byte": 477, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/recursiveInitializer.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForIn.ts_0_147
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true async function main() { for (await using x in {}) { } }
{ "end_byte": 147, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForIn.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.8.ts_0_99
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true { using a; }
{ "end_byte": 99, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.8.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts_0_685
// @target: esnext // @module: esnext // @lib: esnext // @noEmit: true declare const i: Iterator<string, undefined>; declare const io: IteratorObject<string, undefined, unknown>; declare const g: Generator<string, void>; class MyIterator extends Iterator<string> { next() { return { done: true, value: undefined };...
{ "end_byte": 685, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.8.ts_0_117
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true { await using a; } export {};
{ "end_byte": 117, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.8.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.10.ts_0_126
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true declare var x: any; if (x) using a = null;
{ "end_byte": 126, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.10.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts_0_148
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true async function main() { for (await using {} of []) { } }
{ "end_byte": 148, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts_0_302
// @strictNullChecks: false // @noImplicitAny: true, false // @target: esnext // @module: esnext // @lib: esnext // @noEmit: true { using _ = { [Symbol.dispose]() {}, value: null }; } async function f() { { await using _ = { async [Symbol.asyncDispose]() {}, value: null }; } } export {};
{ "end_byte": 302, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithImportHelpers.ts_0_142
// @target: es2022 // @module: esnext // @lib: esnext // @importHelpers: true // @noTypesAndSymbols: true export {}; { using a = null; }
{ "end_byte": 142, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithImportHelpers.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.14.ts_0_96
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true using x = {};
{ "end_byte": 96, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.14.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts_0_631
// @target: esnext // @module: esnext // @lib: esnext // @noEmit: true declare const i: Iterator<string, undefined>; declare const io: IteratorObject<string, undefined, unknown>; declare const g: Generator<string, void>; class MyIterator extends Iterator<string> { next() { return { done: true, value: undefined };...
{ "end_byte": 631, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.2.ts_0_148
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true async function main() { for (await using of of []) { } }
{ "end_byte": 148, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInFor.ts_0_184
// @target: esnext,es2022,es2017,es2015,es5 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true for (using d1 = { [Symbol.dispose]() {} }, d2 = null, d3 = undefined;;) { }
{ "end_byte": 184, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInFor.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.15.ts_0_156
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true // @noUnusedLocals: true export {}; using _ = { [Symbol.dispose]() {} };
{ "end_byte": 156, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.15.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.9.ts_0_106
// @target: esnext // @module: esnext // @lib: es2022 // @noTypesAndSymbols: true { using a = null; }
{ "end_byte": 106, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.9.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.9.ts_0_124
// @target: esnext // @module: esnext // @lib: es2022 // @noTypesAndSymbols: true { await using a = null; } export {};
{ "end_byte": 124, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.9.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.11.ts_0_595
// @target: es5 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true class A {} class C1 extends A { constructor() { using x = null; super(); } } class C2 extends A { constructor() { super(); using x = null; } } class C3 extends A { y = 1; constructor()...
{ "end_byte": 595, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.11.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts_0_382
// @target: esnext // @module: esnext // @lib: esnext // @noEmit: true declare const ai: AsyncIterator<string, undefined>; declare const aio: AsyncIteratorObject<string, undefined, unknown>; declare const ag: AsyncGenerator<string, void>; async function f() { // should pass await using it0 = aio; await us...
{ "end_byte": 382, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.10.ts_0_170
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true export {}; declare var x: any; async function f() { if (x) await using a = null; }
{ "end_byte": 170, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.10.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsTopLevelOfModule.2.ts_0_200
// @target: es2022 // @lib: esnext,dom // @module: commonjs,amd // @noTypesAndSymbols: true // @noEmitHelpers: true using z = { [Symbol.dispose]() {} }; const y = 2; console.log(y, z); export = 4;
{ "end_byte": 200, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsTopLevelOfModule.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithESClassDecorators.1.ts_0_241
// @target: esnext,es2015,es5 // @module: commonjs,system,esnext // @lib: esnext // @experimentalDecorators: false // @noTypesAndSymbols: true // @noEmitHelpers: true export {}; declare var dec: any; using before = null; @dec class C { }
{ "end_byte": 241, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithESClassDecorators.1.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsDeclarationEmit.2.ts_0_239
// @target: esnext // @module: esnext // @declaration: true // @noTypesAndSymbols: true using r1 = { [Symbol.dispose]() {} }; export type R1 = typeof r1; await using r2 = { async [Symbol.asyncDispose]() {} }; export type R2 = typeof r2;
{ "end_byte": 239, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsDeclarationEmit.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithLegacyClassDecorators.1.ts_0_240
// @target: esnext,es2015,es5 // @module: commonjs,system,esnext // @lib: esnext // @experimentalDecorators: true // @noTypesAndSymbols: true // @noEmitHelpers: true export {}; declare var dec: any; using before = null; @dec class C { }
{ "end_byte": 240, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithLegacyClassDecorators.1.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts_0_241
// @target: esnext,es2022,es2017,es2015,es5 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true { await using d1 = { async [Symbol.asyncDispose]() {} }, d2 = { async [Symbol.asyncDispose]() {} }; } export {};
{ "end_byte": 241, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithESClassDecorators.11.ts_0_255
// @target: esnext,es2015,es5 // @module: commonjs,system,esnext // @lib: esnext // @experimentalDecorators: false // @noTypesAndSymbols: true // @noEmitHelpers: true export {}; declare var dec: any; @dec class C { } export { C }; using after = null;
{ "end_byte": 255, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithESClassDecorators.11.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.2.ts_0_196
// @target: esnext,es2022,es2017,es2015,es5 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true { using d1 = { [Symbol.dispose]() {} }, d2 = { [Symbol.dispose]() {} }; }
{ "end_byte": 196, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarations.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsNamedEvaluationDecoratorsAndClassFields.ts_0_387
// @target: es2018 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true export {}; declare var dec: any; using C1 = class { static [Symbol.dispose]() {} }; using C2 = class { static x = 1; static [Symbol.dispose]() {} }; using C3 = @dec class { static [Symbol.dispose]() {} }; using C4 = ...
{ "end_byte": 387, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsNamedEvaluationDecoratorsAndClassFields.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOf.2.ts_0_108
// @target: esnext // @module: esnext // @lib: esnext // @noTypesAndSymbols: true for (using of of []) { }
{ "end_byte": 108, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForOf.2.ts" }
TypeScript/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForAwaitOf.ts_0_215
// @target: esnext,es2022,es2017,es2015,es5 // @module: esnext // @lib: esnext // @noTypesAndSymbols: true async function main() { for await (using d1 of [{ [Symbol.dispose]() {} }, null, undefined]) { } }
{ "end_byte": 215, "start_byte": 0, "url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsInForAwaitOf.ts" }