_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
TypeScript/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts_73202_81566 | rt module Runner {
export function runCollateral(path: string, callback: (error: Error, result: any) => void ) {
path = switchToForwardSlashes(path);
runString(readFile(path), path.match(/[^\/]*$/)[0], callback);
}
export function runJSString(code: string, callback: (err... | {
"end_byte": 81566,
"start_byte": 73202,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature9.ts_0_20 | interface I {
0;
} | {
"end_byte": 20,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature9.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature8.ts_0_27 | interface I {
"H"?:any;
} | {
"end_byte": 27,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature8.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature12.ts_0_25 | interface I {
3?:any;
} | {
"end_byte": 25,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature12.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature3.ts_0_24 | interface I {
C:any;
} | {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature3.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature7.ts_0_26 | interface I {
"G":any;
} | {
"end_byte": 26,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature7.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature6.ts_0_23 | interface I {
"F"?;
} | {
"end_byte": 23,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature6.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature2.ts_0_21 | interface I {
B?;
} | {
"end_byte": 21,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature2.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature5.ts_0_22 | interface I {
"E";
} | {
"end_byte": 22,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature5.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature10.ts_0_21 | interface I {
1?;
} | {
"end_byte": 21,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature10.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature1.ts_0_20 | interface I {
A;
} | {
"end_byte": 20,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature1.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature11.ts_0_24 | interface I {
2:any;
} | {
"end_byte": 24,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature11.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature4.ts_0_25 | interface I {
D?:any;
} | {
"end_byte": 25,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript5/PropertySignatures/parserPropertySignature4.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts_0_29 | class C {
get Foo() { }
} | {
"end_byte": 29,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts_0_27 | var v = { set Foo(a) { } }; | {
"end_byte": 27,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts_0_26 | var v = { get Foo() { } }; | {
"end_byte": 26,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts_0_30 | class C {
set Foo(a) { }
} | {
"end_byte": 30,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2018/forAwait/parser.forAwait.es2018.ts_0_1301 | // @target: es2018
// @lib: esnext
// @noEmit: true
// @filename: topLevelWithDeclIsError.ts
for await (const x of y) {
}
// @filename: topLevelWithExprIsError.ts
for await (x of y) {
}
// @filename: forAwaitInWithDeclIsError.ts
for await (const x in y) {
}
// @filename: forAwaitInWithExprIsError.ts
for await (x in y) ... | {
"end_byte": 1301,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2018/forAwait/parser.forAwait.es2018.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts_0_2126 | // @target: es2018
// @lib: esnext
// @noEmit: true
// @filename: functionExpressionIsOk.ts
const f1 = async function * f() {
};
// @filename: awaitNameIsError.ts
const f2 = async function * await() {
};
// @filename: yieldNameIsError.ts
const f3 = async function * yield() {
};
// @filename: awaitParameterIsError.ts
co... | {
"end_byte": 2126,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionExpressions.es2018.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts_0_2616 | // @target: es2018
// @lib: esnext
// @noEmit: true
// @filename: methodIsOk.ts
class C1 {
async * f() {
}
}
// @filename: awaitMethodNameIsOk.ts
class C2 {
async * await() {
}
}
// @filename: yieldMethodNameIsOk.ts
class C3 {
async * yield() {
}
}
// @filename: awaitParameterIsError.ts
class C4... | {
"end_byte": 2616,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts_0_2604 | // @target: es2018
// @skipLibCheck: true
// @lib: esnext
// @noEmit: true
// @filename: methodIsOk.ts
const o1 = {
async * f() {
}
};
// @filename: awaitMethodNameIsOk.ts
const o2 = {
async * await() {
}
};
// @filename: yieldMethodNameIsOk.ts
const o3 = {
async * yield() {
}
};
// @filename: a... | {
"end_byte": 2604,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts_0_1907 | // @target: es2018
// @lib: esnext
// @noEmit: true
// @filename: functionDeclarationIsOk.ts
async function * f1() {
}
// @filename: awaitNameIsOk.ts
async function * await() {
}
// @filename: yieldNameIsOk.ts
async function * yield() {
}
// @filename: awaitParameterIsError.ts
async function * f4(await) {
}
// @filenam... | {
"end_byte": 1907,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.functionDeclarations.es2018.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts_0_169 | // @target: es5, es2020, es2021
1_000_000_000
1.1_00_01
1e1_0
1e+1_0
1e-1_0
1.1e10_0
1.1e+10_0
1.1e-10_0
12_34_56
1_22_333
1_2.3_4
1_2.3_4e5_6
1_2.3_4e+5_6
1_2.3_4e-5_6
| {
"end_byte": 169,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decimal.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decmialNegative.ts_0_1437 | // @filename: 1.ts
_10
// @filename: 2.ts
10_
// @filename: 3.ts
1__0
// @filename: 4.ts
0_.0
// @filename: 5.ts
0._0
// @filename: 6.ts
0.0__0
// @filename: 7.ts
0.0__
// @filename: 8.ts
0_e0
// @filename: 9.ts
0e_0
// @filename: 10.ts
0e0_
// @filename: 11.ts
0e0__0
// @filename: 12.ts
0_.0e0
// @filename... | {
"end_byte": 1437,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.decmialNegative.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hexNegative.ts_0_184 | // @filename: 1.ts
0x00_
// @filename: 2.ts
0x_110
// @filename: 3.ts
0_X0101
// @filename: 4.ts
0x01__11
// @filename: 5.ts
0X0110_0110__
// @filename: 6.ts
0x___0111010_0101_1
| {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hexNegative.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts_0_42 | 0b00_11;
0B0_1;
0b1100_0011;
0B0_11_0101;
| {
"end_byte": 42,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binary.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binaryNegative.ts_0_184 | // @filename: 1.ts
0b00_
// @filename: 2.ts
0b_110
// @filename: 3.ts
0_B0101
// @filename: 4.ts
0b01__11
// @filename: 5.ts
0B0110_0110__
// @filename: 6.ts
0b___0111010_0101_1
| {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.binaryNegative.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts_0_42 | 0x00_11;
0X0_1;
0x1100_0011;
0X0_11_0101;
| {
"end_byte": 42,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.hex.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts_0_42 | 0o00_11;
0O0_1;
0o1100_0011;
0O0_11_0101;
| {
"end_byte": 42,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octal.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.unicodeEscape.ts_0_1554 | // @target: es2021
// @filename: 1.ts
"\u{10_ffff}"
// @filename: 2.ts
'\u{10_ffff}'
// @filename: 3.ts
`\u{10_ffff}`
// @filename: 4.ts
/\u{10_ffff}/u
// @filename: 5.ts
"\uff_ff"
// @filename: 6.ts
'\uff_ff'
// @filename: 7.ts
`\uff_ff`
// @filename: 8.ts
/\uff_ff/u
// @filename: 9.ts
"\xf_f"
// @filename: ... | {
"end_byte": 1554,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.unicodeEscape.ts"
} |
TypeScript/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octalNegative.ts_0_184 | // @filename: 1.ts
0o00_
// @filename: 2.ts
0o_110
// @filename: 3.ts
0_O0101
// @filename: 4.ts
0o01__11
// @filename: 5.ts
0O0110_0110__
// @filename: 6.ts
0o___0111010_0101_1
| {
"end_byte": 184,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/parser/ecmascript2021/numericSeparators/parser.numericSeparators.octalNegative.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts_0_189 | module A {
export enum Color { Red, Blue }
enum Day { Monday, Tuesday }
}
// not an error since exported
var a: A.Color = A.Color.Red;
// error not exported
var b = A.Day.Monday;
| {
"end_byte": 189,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts_0_333 | module A {
export interface Point {
x: number;
y: number;
}
// valid since Point is exported
export var Origin: Point = { x: 0, y: 0 };
interface Point3d extends Point {
z: number;
}
// invalid Point3d is not exported
export var Origin3d: Point3d = { x: 0, y: ... | {
"end_byte": 333,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts_0_232 | module A {
class Point {
constructor(public x: number, public y: number) { }
}
export var UnitSquare : {
top: { left: Point, right: Point },
bottom: { left: Point, right: Point }
} = null;
} | {
"end_byte": 232,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts_0_295 | module A {
interface Point {
x: number;
y: number;
fromOrigin(p: Point): number;
}
export class Point2d implements Point {
constructor(public x: number, public y: number) { }
fromOrigin(p: Point) {
return 1;
}
}
}
| {
"end_byte": 295,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts_1_652 | module Inner {
var;
let;
const;
export var a;
export let b;
export var c: string;
export let d: number;
class A {}
export var e: A;
export let f: A;
namespace B {
export let a = 1, b, c = 2;
export let x, y, z;
}
module C {
expor... | {
"end_byte": 652,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts_0_270 | module A {
class Point {
x: number;
y: number;
}
export class Line {
constructor(public start: Point, public end: Point) { }
}
export function fromOrigin(p: Point): Line {
return new Line({ x: 0, y: 0 }, p);
}
} | {
"end_byte": 270,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts_0_172 | module A {
export interface Point {
x: number;
y: number;
}
// valid since Point is exported
export var Origin: Point = { x: 0, y: 0 };
}
| {
"end_byte": 172,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts_0_400 | module A {
interface Point {
x: number;
y: number;
}
export var Origin: Point = { x: 0, y: 0 };
export interface Point3d extends Point {
z: number;
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
export interface Line<TPoint extends Point>{
new (st... | {
"end_byte": 400,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts_0_374 | module A {
export class Point {
x: number;
y: number;
}
export var Origin: Point = { x: 0, y: 0 };
export class Point3d extends Point {
z: number;
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
export class Line<TPoint extends Point>{
constructor(... | {
"end_byte": 374,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts_0_848 | module A {
export interface Point {
x: number;
y: number;
}
interface Point3d extends Point {
z: number;
}
}
module B {
export class Line {
constructor(public start: A.Point, public end: A.Point) { }
}
}
module Geometry {
export import Points = A;
impor... | {
"end_byte": 848,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts_0_400 | module A {
export class Point {
constructor(public x: number, public y: number) { }
}
export module B {
export var Origin: Point = new Point(0, 0);
export class Line {
constructor(start: Point, end: Point) {
}
static fromOrigin(p: Point) {
... | {
"end_byte": 400,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts_0_140 | module A {
export var x = 'hello world'
var y = 12;
}
var x: string;
var x = A.x;
// Error, since y is not exported
var y = A.y;
| {
"end_byte": 140,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts_0_123 | module A {
class B {
id: number;
}
export var beez: Array<B>;
export var beez2 = new Array<B>();
} | {
"end_byte": 123,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts_0_406 | module A {
export interface Point {
x: number;
y: number;
}
export var Origin: Point = { x: 0, y: 0 };
export interface Point3d extends Point {
z: number;
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
export interface Line<TPoint extends Point>{
... | {
"end_byte": 406,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts_0_516 | module A {
export class A {
id: number;
name: string;
}
export class AG<T, U>{
id: T;
name: U;
}
class A2 {
id: number;
name: string;
}
class AG2<T, U>{
id: T;
name: U;
}
}
// no errors expected, these are all exported
v... | {
"end_byte": 516,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts_0_455 | module A {
class Point {
x: number;
y: number;
}
export var Origin: Point = { x: 0, y: 0 };
export class Point3d extends Point {
z: number;
}
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
export class Line<TPoint extends Point>{
constructor(public ... | {
"end_byte": 455,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts_0_179 | module A {
interface Point {
x: number;
y: number;
}
export interface points {
[idx: number]: Point;
[idx: string]: Point;
}
}
| {
"end_byte": 179,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts_0_538 | module A {
export function fn(s: string) {
return true;
}
export function fng<T, U>(s: T): U {
return null;
}
function fn2(s: string) {
return false;
}
function fng2<T, U>(s: T): U {
return null;
}
}
// these should not be errors since the functions a... | {
"end_byte": 538,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts_0_220 | module A {
class Point {
constructor(public x: number, public y: number) { }
}
export var Origin: Point = { x: 0, y: 0 };
export var Unity = { start: new Point(0, 0), end: new Point(1, 0) };
}
| {
"end_byte": 220,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts_0_270 | module A {
export class Point {
x: number;
y: number;
}
class Line {
constructor(public start: Point, public end: Point) { }
}
export function fromOrigin(p: Point): Line {
return new Line({ x: 0, y: 0 }, p);
}
} | {
"end_byte": 270,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts_0_171 | module A {
class Point {
x: number;
y: number;
}
export class points {
[idx: number]: Point;
[idx: string]: Point;
}
}
| {
"end_byte": 171,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts"
} |
TypeScript/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts_0_277 | module A {
export class Point {
x: number;
y: number;
}
export class Line {
constructor(public start: Point, public end: Point) { }
}
export function fromOrigin(p: Point): Line {
return new Line({ x: 0, y: 0 }, p);
}
} | {
"end_byte": 277,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts"
} |
TypeScript/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts_0_616 | module A {
export interface Point {
x: number;
y: number;
}
export module inA {
export interface Point3D extends Point {
z: number;
}
}
}
// no code gen expected
module B {
import a = A;
}
// no code gen expected
module C {
import a = A;
import ... | {
"end_byte": 616,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts"
} |
TypeScript/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts_0_617 | module A {
export class Point {
constructor(public x: number, public y: number) { }
}
export var Origin = new Point(0, 0);
}
// no code gen expected
module B {
import a = A; //Error generates 'var <Alias> = <EntityName>;'
}
// no code gen expected
module C {
import a = A; //Error generate... | {
"end_byte": 617,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts"
} |
TypeScript/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts_1_928 | // should replace all refs to 'x' in the body,
// with fully qualified
module A {
export var x = 12;
function lt12() {
return x < 12;
}
}
// should not fully qualify 'x'
module B {
var x = 12;
function lt12() {
return x < 12;
}
}
// not copied, since not exported
module C {
... | {
"end_byte": 928,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts"
} |
TypeScript/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts_0_713 | module A {
// these 2 statements force an underscore before the 'A'
// in the generated function call.
var A = 12;
var _A = '';
}
module B {
var A = 12;
}
module B {
// re-opened module with colliding name
// this should add an underscore.
class B {
name: string;
}
}
modu... | {
"end_byte": 713,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts_0_388 | declare module pack1 {
const test1: string;
export { test1 };
}
declare module pack2 {
import test1 = pack1.test1;
export { test1 };
}
export import test1 = pack2.test1;
declare module mod1 {
type test1 = string;
export { test1 };
}
declare module mod2 {
import test1 = mod1.test1;
export { test1 };
}
c... | {
"end_byte": 388,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts_0_231 | module M {
export class Point { x: number; y: number }
export var Point = 1; // Error
}
module M2 {
export interface Point { x: number; y: number }
export var Point = 1;
}
var m = M2;
var p: m.Point; // Error
| {
"end_byte": 231,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts_1_30 | let module = 10;
module in {} | {
"end_byte": 30,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts_0_1055 | // adding the var makes this an instantiated module
module M {
export interface Point { x: number; y: number }
export var Point = 1;
}
// primary expression
var m: typeof M;
var m = M;
var a1: number;
var a1 = M.Point;
var a1 = m.Point;
var p1: { x: number; y: number; }
var p1: M.Point;
// making the point... | {
"end_byte": 1055,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts_1_170 | var namespace: number;
var n: string;
namespace // this is the identifier 'namespace'
n // this is the identifier 'n'
{ } // this is a block body | {
"end_byte": 170,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts_1_82 | let namespace = 10;
namespace a.b {
export let c = 20;
}
namespace
a.b.c
{
} | {
"end_byte": 82,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts_0_714 | module M {
export interface Point { x: number; y: number }
export var a = 1;
}
// primary expression
var m : typeof M;
var m = M;
var a1: number;
var a1 = M.a;
var a2: number;
var a2 = m.a;
module M2 {
export module Point {
export function Origin(): Point {
return { x: 0, y: 0 };
... | {
"end_byte": 714,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts_0_485 | module A.B.C {
export interface Point {
x: number;
y: number;
}
}
module A {
export module B {
var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C'
}
}
module M2.X {
export interface Point {
x: number; y: number;
}
}
module M2 {
exp... | {
"end_byte": 485,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts_1_167 | var module: number;
var m: string;
module // this is the identifier 'namespace'
m // this is the identifier 'm'
{ } // this is a block body | {
"end_byte": 167,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts_0_364 | module A.B.C {
export class Point {
x: number;
y: number;
}
}
module A {
export module B {
export class C { // Error
name: string;
}
}
}
module M2.X {
export class Point {
x: number; y: number;
}
}
module M2 {
export module X {
e... | {
"end_byte": 364,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts_1_206 | var namespace: number;
var n: string;
namespace container {
namespace // this is the identifier 'namespace'
n // this is the identifier 'n'
{ } // this is a block body
} | {
"end_byte": 206,
"start_byte": 1,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts_0_171 | module M {
export interface Point { x: number; y: number }
}
var m = M; // Error, not instantiated can not be used as var
var x: typeof M; // Error only a namespace
| {
"end_byte": 171,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts_0_1225 | // All of these should be an error
module Y {
public class A { s: string }
public class BB<T> extends A {
id: number;
}
}
module Y2 {
public class AA<T> { s: T }
public interface I { id: number }
public class B extends AA<string> implements I { id: number }
}
module Y3 {
public ... | {
"end_byte": 1225,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts_0_333 | // All of these should be an error
module Y {
public var x: number = 0;
}
module Y2 {
public function fn(x: string) { }
}
module Y4 {
static var x: number = 0;
}
module YY {
static function fn(x: string) { }
}
module YY2 {
private var x: number = 0;
}
module YY3 {
private function fn(x: s... | {
"end_byte": 333,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts"
} |
TypeScript/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts_0_1232 | module A {
class A { s: string }
class AA<T> { s: T }
interface I { id: number }
class B extends AA<string> implements I { id: number }
class BB<T> extends A {
id: number;
}
module Module {
class A { s: string }
}
enum Color { Blue, Red }
var x = 12;
functio... | {
"end_byte": 1232,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts_0_468 | // @filename: module.d.ts
declare module A {
export module Point {
export var Origin: {
x: number;
y: number;
}
}
}
// @filename: class.d.ts
declare module A {
export class Point {
constructor(x: number, y: number);
x: number;
y: number;
}... | {
"end_byte": 468,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts_0_583 | class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
}
module Point {
export function Origin() { return null; } //expected duplicate identifier error
}
module A {
export class Point {
construct... | {
"end_byte": 583,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts_0_456 | class Point {
constructor(public x: number, public y: number) { }
static Origin: Point = { x: 0, y: 0 };
}
module Point {
export var Origin = ""; //expected duplicate identifier error
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin... | {
"end_byte": 456,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts_0_471 | // @filename: module.ts
module A {
export module Point {
export var Origin = { x: 0, y: 0 };
}
}
// @filename: function.ts
module A {
// duplicate identifier error
export function Point() {
return { x: 0, y: 0 };
}
}
// @filename: simple.ts
module B {
export module Point {
... | {
"end_byte": 471,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts_0_804 | //@filename: part1.ts
module A {
export interface Point {
x: number;
y: number;
}
export module Utils {
export function mirror<T extends Point>(p: T) {
return { x: p.y, y: p.x };
}
}
export var Origin: Point = { x: 0, y: 0 };
}
//@filename: part2.ts
modu... | {
"end_byte": 804,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts_0_361 | // @filename: function.ts
module A {
export function Point() {
return { x: 0, y: 0 };
}
}
// @filename: module.ts
module B {
export module Point {
export var Origin = { x: 0, y: 0 };
}
}
// @filename: test.ts
var fn: () => { x: number; y: number };
var fn = A.Point;
var cl: { x: numbe... | {
"end_byte": 361,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts_0_278 | // @filename: module.d.ts
declare module Point {
export var Origin: { x: number; y: number; }
}
// @filename: function.d.ts
declare function Point(): { x: number; y: number; }
// @filename: test.ts
var cl: { x: number; y: number; }
var cl = Point();
var cl = Point.Origin; | {
"end_byte": 278,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts_0_254 | class clodule<T> {
id: string;
value: T;
private static sfn(id: string) { return 42; }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): number {
return clodule.sfn('a');
}
}
| {
"end_byte": 254,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts_0_485 | // @Filename: module.ts
module X.Y {
export module Point {
export var Origin = new Point(0, 0);
}
}
// @Filename: classPoint.ts
module X.Y {
// duplicate identifier
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
... | {
"end_byte": 485,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts_0_502 | // all expected to be errors
class clodule1<T>{
id: string;
value: T;
}
module clodule1 {
function f(x: T) { }
}
class clodule2<T>{
id: string;
value: T;
}
module clodule2 {
var x: T;
class D<U extends T>{
id: string;
value: U;
}
}
class clodule3<T>{
id: stri... | {
"end_byte": 502,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts_0_839 | // @filename: function.ts
module A {
export function Point() {
return { x: 0, y: 0 };
}
}
// @filename: module.ts
module A {
export module Point {
export var Origin = { x: 0, y: 0 };
}
}
// @filename: test.ts
var fn: () => { x: number; y: number };
var fn = A.Point;
var cl: { x: numbe... | {
"end_byte": 839,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts_0_593 | //@filename: part1.ts
export module A {
export interface Point {
x: number;
y: number;
}
export module Utils {
export function mirror<T extends Point>(p: T) {
return { x: p.y, y: p.x };
}
}
export var Origin: Point = { x: 0, y: 0 };
}
//@filename: part2... | {
"end_byte": 593,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts_0_483 | module A.B {
export var x: number;
}
module A{
module B {
export var x: string;
}
}
// ensure the right var decl is exported
var x: number;
var x = A.B.x;
module X.Y.Z {
export class Line {
length: number;
}
}
module X {
export module Y {
module Z {
expor... | {
"end_byte": 483,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts_0_688 | // @filename: class.ts
module X.Y {
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
x: number;
y: number;
}
}
// @filename: module.ts
module X.Y {
export module Point {
export var Origin = new Point(0, 0);
... | {
"end_byte": 688,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts_0_437 | class Point {
constructor(public x: number, public y: number) { }
static Origin: Point = { x: 0, y: 0 };
}
module Point {
var Origin = ""; // not an error, since not exported
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin: Point =... | {
"end_byte": 437,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts_0_451 | module A {
export class Point {
x: number;
y: number;
}
}
module A{
// expected error
export class Point {
origin: number;
angle: number;
}
}
module X.Y.Z {
export class Line {
length: number;
}
}
module X {
export module Y {
export modu... | {
"end_byte": 451,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts_0_601 | module A {
export interface Point {
x: number;
y: number;
toCarth(): Point;
}
}
module A {
interface Point {
fromCarth(): Point;
}
}
// ensure merges as expected
var p: { x: number; y: number; toCarth(): A.Point; };
var p: A.Point;
module X.Y.Z {
export interface L... | {
"end_byte": 601,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts_0_582 | module A {
export class Point {
x: number;
y: number;
}
}
module A {
class Point {
fromCarthesian(p: A.Point) {
return { x: p.x, y: p.y };
}
}
}
// ensure merges as expected
var p: { x: number; y: number; };
var p: A.Point;
module X.Y.Z {
export class L... | {
"end_byte": 582,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts_0_212 | class clodule<T> {
id: string;
value: T;
static fn<U>(id: U) { }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): T {
return x;
}
}
| {
"end_byte": 212,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts_0_272 | // @filename: module.d.ts
declare module Point {
export var Origin: { x: number; y: number; }
}
// @filename: function.ts
function Point() {
return { x: 0, y: 0 };
}
// @filename: test.ts
var cl: { x: number; y: number; }
var cl = Point();
var cl = Point.Origin; | {
"end_byte": 272,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts_0_252 | enum enumdule {
Red, Blue
}
module enumdule {
export class Point {
constructor(public x: number, public y: number) { }
}
}
var x: enumdule;
var x = enumdule.Red;
var y: { x: number; y: number };
var y = new enumdule.Point(0, 0); | {
"end_byte": 252,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts_0_252 | module enumdule {
export class Point {
constructor(public x: number, public y: number) { }
}
}
enum enumdule {
Red, Blue
}
var x: enumdule;
var x = enumdule.Red;
var y: { x: number; y: number };
var y = new enumdule.Point(0, 0); | {
"end_byte": 252,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts_0_674 | //@filename: part1.ts
module Root {
export module A {
export interface Point {
x: number;
y: number;
}
export module Utils {
export function mirror<T extends Point>(p: T) {
return { x: p.y, y: p.x };
}
}
}
}
//@fil... | {
"end_byte": 674,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts_0_440 | // @filename: module.d.ts
declare module A {
export module Point {
export var Origin: {
x: number;
y: number;
}
}
}
// @filename: classPoint.ts
module A {
export class Point {
constructor(public x: number, public y: number) { }
}
}
// @filename: test.ts
... | {
"end_byte": 440,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts_0_667 | module A {
export interface Point {
x: number;
y: number;
toCarth(): Point;
}
}
module A {
export interface Point {
fromCarth(): Point;
}
}
// ensure merges as expected
var p: { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; };
var p: A.Point;
module X... | {
"end_byte": 667,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts_0_704 | // @target: ES6
// @filename: class.ts
module X.Y {
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
x: number;
y: number;
}
}
// @filename: module.ts
module X.Y {
export module Point {
export var Origin = new... | {
"end_byte": 704,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts_0_214 | class clodule<T> {
id: string;
value: T;
static fn(id: string) { }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): T {
return x;
}
}
| {
"end_byte": 214,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts"
} |
TypeScript/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts_0_726 | //@filename: part1.ts
module A {
export interface Point {
x: number;
y: number;
}
export module Utils {
export function mirror<T extends Point>(p: T) {
return { x: p.y, y: p.x };
}
}
}
//@filename: part2.ts
module A {
export var Origin: Point = { x: 0, y... | {
"end_byte": 726,
"start_byte": 0,
"url": "https://github.com/microsoft/TypeScript/blob/main/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.