mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
More type baseline changes
This commit is contained in:
+26
-9
@@ -906,7 +906,7 @@ module ts {
|
||||
// Get qualified name
|
||||
if (enclosingDeclaration &&
|
||||
// Properties/methods/Signatures/Constructors/TypeParameters do not need qualification
|
||||
!(symbol.flags & SymbolFlags.PropertyOrAccessor & SymbolFlags.Signature & SymbolFlags.Constructor & SymbolFlags.Method & SymbolFlags.TypeParameter)) {
|
||||
!(symbol.flags & (SymbolFlags.PropertyOrAccessor | SymbolFlags.Signature | SymbolFlags.Constructor | SymbolFlags.Method | SymbolFlags.TypeParameter))) {
|
||||
var symbolName: string;
|
||||
while (symbol) {
|
||||
var isFirstName = !symbolName;
|
||||
@@ -1036,8 +1036,10 @@ module ts {
|
||||
(type.symbol.parent || // is exported function symbol
|
||||
ts.forEach(type.symbol.declarations, declaration =>
|
||||
declaration.parent.kind === SyntaxKind.SourceFile || declaration.parent.kind === SyntaxKind.ModuleBlock));
|
||||
|
||||
if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
|
||||
if (isStaticMethodSymbol) {
|
||||
return false;
|
||||
}
|
||||
if (isNonLocalFunctionSymbol) {
|
||||
// typeof is allowed only for static/non local functions
|
||||
return !!(flags & TypeFormatFlags.UseTypeOfFunction) || // use typeof if format flags specify it
|
||||
(typeStack && contains(typeStack, type)); // it is type of the symbol uses itself recursively
|
||||
@@ -2237,11 +2239,11 @@ module ts {
|
||||
}
|
||||
var type = getDeclaredTypeOfSymbol(symbol);
|
||||
if (!(type.flags & TypeFlags.ObjectType)) {
|
||||
error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, name);
|
||||
error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
|
||||
return emptyObjectType;
|
||||
}
|
||||
if (((<InterfaceType>type).typeParameters ? (<InterfaceType>type).typeParameters.length : 0) !== arity) {
|
||||
error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, name, arity);
|
||||
error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
|
||||
return emptyObjectType;
|
||||
}
|
||||
return <ObjectType>type;
|
||||
@@ -6680,6 +6682,7 @@ module ts {
|
||||
case SyntaxKind.Parameter:
|
||||
case SyntaxKind.Property:
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
return (<VariableDeclaration>parent).initializer === node;
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
case SyntaxKind.IfStatement:
|
||||
@@ -6809,6 +6812,11 @@ module ts {
|
||||
/*all meanings*/ SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Import);
|
||||
}
|
||||
|
||||
if (isInRightSideOfImportOrExportAssignment(entityName)) {
|
||||
// Since we already checked for ExportAssignment, this really could only be an Import
|
||||
return getSymbolOfPartOfRightHandSideOfImport(entityName);
|
||||
}
|
||||
|
||||
if (isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
|
||||
entityName = entityName.parent;
|
||||
}
|
||||
@@ -6907,6 +6915,18 @@ module ts {
|
||||
return getDeclaredTypeOfSymbol(symbol);
|
||||
}
|
||||
|
||||
if (node.kind === SyntaxKind.ModuleDeclaration ||
|
||||
node.kind === SyntaxKind.ImportDeclaration) {
|
||||
return unknownType;
|
||||
}
|
||||
|
||||
if (node.parent.kind === SyntaxKind.ModuleDeclaration ||
|
||||
node.parent.kind === SyntaxKind.ImportDeclaration) {
|
||||
if ((<Declaration>node.parent).name === node) {
|
||||
return unknownType;
|
||||
}
|
||||
}
|
||||
|
||||
if (isDeclaration(node)) {
|
||||
// In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration
|
||||
var symbol = getSymbolOfNode(node);
|
||||
@@ -6920,10 +6940,7 @@ module ts {
|
||||
|
||||
if (isInRightSideOfImportOrExportAssignment(node)) {
|
||||
var symbol: Symbol;
|
||||
symbol = node.parent.kind === SyntaxKind.ExportAssignment
|
||||
? getSymbolInfo(node)
|
||||
: getSymbolOfPartOfRightHandSideOfImport(node);
|
||||
|
||||
symbol = getSymbolInfo(node);
|
||||
var declaredType = getDeclaredTypeOfSymbol(symbol);
|
||||
return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol);
|
||||
}
|
||||
|
||||
@@ -68,6 +68,14 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||
var createNewInstance = false;
|
||||
|
||||
before(() => {
|
||||
justName = fileName.replace(/^.*[\\\/]/, ''); // strips the fileName from the path.
|
||||
content = Harness.IO.readFile(fileName);
|
||||
testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, fileName);
|
||||
units = testCaseContent.testUnitData;
|
||||
tcSettings = testCaseContent.settings;
|
||||
createNewInstance = false;
|
||||
lastUnit = units[units.length - 1];
|
||||
rootDir = lastUnit.originalFilePath.indexOf('conformance') === -1 ? 'tests/cases/compiler/' : lastUnit.originalFilePath.substring(0, lastUnit.originalFilePath.lastIndexOf('/')) + '/';
|
||||
harnessCompiler = Harness.Compiler.getCompiler();
|
||||
// We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test)
|
||||
// If the last file in a test uses require or a triple slash reference we'll assume all other files will be brought in via references,
|
||||
|
||||
@@ -78,6 +78,12 @@ class TypeWriterWalker {
|
||||
var lineAndCharacter = this.currentSourceFile.getLineAndCharacterFromPosition(actualPos);
|
||||
var sourceText = ts.getSourceTextOfNodeFromSourceText(this.currentSourceFile.text, node);
|
||||
var isUnknownType = (<ts.IntrinsicType>type).intrinsicName === "unknown";
|
||||
if (isUnknownType) {
|
||||
var symbol = this.checker.getSymbolInfo(node);
|
||||
}
|
||||
else {
|
||||
var writeArrayAsGenericType = node.kind === ts.SyntaxKind.Identifier && (<ts.Identifier>node).text === "Array" ? ts.TypeFormatFlags.WriteArrayAsGenericType : 0;
|
||||
}
|
||||
|
||||
// If we got an unknown type, we temporarily want to fall back to just pretending the name
|
||||
// (source text) of the node is the type. This is to align with the old typeWriter to make
|
||||
@@ -87,7 +93,9 @@ class TypeWriterWalker {
|
||||
column: lineAndCharacter.character,
|
||||
syntaxKind: ts.SyntaxKind[node.kind],
|
||||
identifierName: sourceText,
|
||||
type: isUnknownType ? sourceText : this.checker.typeToString(type, undefined, ts.TypeFormatFlags.UseTypeOfFunction)
|
||||
type: isUnknownType
|
||||
? this.checker.symbolToString(symbol, node.parent, ts.SymbolFlags.Value | ts.SymbolFlags.Type | ts.SymbolFlags.Namespace | ts.SymbolFlags.Import)
|
||||
: this.checker.typeToString(type, node.parent, ts.TypeFormatFlags.UseTypeOfFunction | writeArrayAsGenericType)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts ===
|
||||
declare module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
export var Origin: { x: number; y: number; }
|
||||
>Origin : { x: number; y: number; }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts ===
|
||||
declare module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
export var Origin: {
|
||||
>Origin : { x: number; y: number; }
|
||||
@@ -19,7 +19,7 @@ declare module A {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/class.d.ts ===
|
||||
declare module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -45,15 +45,15 @@ var p: { x: number; y: number; }
|
||||
var p = A.Point.Origin;
|
||||
>p : { x: number; y: number; }
|
||||
>A.Point.Origin : { x: number; y: number; }
|
||||
>A.Point : typeof Point
|
||||
>A.Point : typeof A.Point
|
||||
>A : typeof A
|
||||
>Point : typeof Point
|
||||
>Point : typeof A.Point
|
||||
>Origin : { x: number; y: number; }
|
||||
|
||||
var p = new A.Point(0, 0); // unexpected error here, bug 840000
|
||||
>p : { x: number; y: number; }
|
||||
>new A.Point(0, 0) : Point
|
||||
>A.Point : typeof Point
|
||||
>new A.Point(0, 0) : A.Point
|
||||
>A.Point : typeof A.Point
|
||||
>A : typeof A
|
||||
>Point : typeof Point
|
||||
>Point : typeof A.Point
|
||||
|
||||
|
||||
+8
-8
@@ -1,9 +1,9 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts ===
|
||||
declare module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
export var Origin: {
|
||||
>Origin : { x: number; y: number; }
|
||||
@@ -19,7 +19,7 @@ declare module A {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -39,15 +39,15 @@ var p: { x: number; y: number; }
|
||||
var p = A.Point.Origin;
|
||||
>p : { x: number; y: number; }
|
||||
>A.Point.Origin : { x: number; y: number; }
|
||||
>A.Point : typeof Point
|
||||
>A.Point : typeof A.Point
|
||||
>A : typeof A
|
||||
>Point : typeof Point
|
||||
>Point : typeof A.Point
|
||||
>Origin : { x: number; y: number; }
|
||||
|
||||
var p = new A.Point(0, 0); // unexpected error here, bug 840000
|
||||
>p : { x: number; y: number; }
|
||||
>new A.Point(0, 0) : Point
|
||||
>A.Point : typeof Point
|
||||
>new A.Point(0, 0) : A.Point
|
||||
>A.Point : typeof A.Point
|
||||
>A : typeof A
|
||||
>Point : typeof Point
|
||||
>Point : typeof A.Point
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts ===
|
||||
declare module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
export var Origin: { x: number; y: number; }
|
||||
>Origin : { x: number; y: number; }
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@ class Point {
|
||||
>y : number
|
||||
|
||||
static Origin(): Point { return { x: 0, y: 0 }; }
|
||||
>Origin : typeof Origin
|
||||
>Origin : () => Point
|
||||
>Point : Point
|
||||
>{ x: 0, y: 0 } : { x: number; y: number; }
|
||||
>x : number
|
||||
@@ -15,7 +15,7 @@ class Point {
|
||||
}
|
||||
|
||||
module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
function Origin() { return ""; }// not an error, since not exported
|
||||
>Origin : typeof Origin
|
||||
@@ -23,7 +23,7 @@ module Point {
|
||||
|
||||
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -33,7 +33,7 @@ module A {
|
||||
>y : number
|
||||
|
||||
static Origin(): Point { return { x: 0, y: 0 }; }
|
||||
>Origin : typeof Origin
|
||||
>Origin : () => Point
|
||||
>Point : Point
|
||||
>{ x: 0, y: 0 } : { x: number; y: number; }
|
||||
>x : number
|
||||
@@ -41,7 +41,7 @@ module A {
|
||||
}
|
||||
|
||||
export module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
function Origin() { return ""; }// not an error since not exported
|
||||
>Origin : typeof Origin
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ class Point {
|
||||
}
|
||||
|
||||
module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
var Origin = ""; // not an error, since not exported
|
||||
>Origin : string
|
||||
@@ -23,7 +23,7 @@ module Point {
|
||||
|
||||
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -41,7 +41,7 @@ module A {
|
||||
}
|
||||
|
||||
export module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
var Origin = ""; // not an error since not exported
|
||||
>Origin : string
|
||||
|
||||
@@ -8,7 +8,7 @@ enum enumdule {
|
||||
}
|
||||
|
||||
module enumdule {
|
||||
>enumdule : typeof enumdule
|
||||
>enumdule : enumdule
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -36,8 +36,8 @@ var y: { x: number; y: number };
|
||||
|
||||
var y = new enumdule.Point(0, 0);
|
||||
>y : { x: number; y: number; }
|
||||
>new enumdule.Point(0, 0) : Point
|
||||
>enumdule.Point : typeof Point
|
||||
>new enumdule.Point(0, 0) : enumdule.Point
|
||||
>enumdule.Point : typeof enumdule.Point
|
||||
>enumdule : typeof enumdule
|
||||
>Point : typeof Point
|
||||
>Point : typeof enumdule.Point
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
interface Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class Point {
|
||||
>Point : Point
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class Point {
|
||||
>Point : Point
|
||||
@@ -47,7 +47,7 @@ module A {
|
||||
>TPoint : TPoint
|
||||
|
||||
static fromorigin2d(p: Point): Line<Point>{
|
||||
>fromorigin2d : typeof fromorigin2d
|
||||
>fromorigin2d : (p: Point) => Line<Point>
|
||||
>p : Point
|
||||
>Point : Point
|
||||
>Line : Line<TPoint>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
interface Point {
|
||||
>Point : Point
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -11,7 +11,7 @@ module A {
|
||||
}
|
||||
|
||||
export module B {
|
||||
>B : typeof B
|
||||
>B : B
|
||||
|
||||
export var Origin: Point = new Point(0, 0);
|
||||
>Origin : Point
|
||||
@@ -31,7 +31,7 @@ module A {
|
||||
}
|
||||
|
||||
static fromOrigin(p: Point) {
|
||||
>fromOrigin : typeof fromOrigin
|
||||
>fromOrigin : (p: Point) => Line
|
||||
>p : Point
|
||||
>Point : Point
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class Point {
|
||||
>Point : Point
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class B {
|
||||
>B : B
|
||||
@@ -11,12 +11,12 @@ module A {
|
||||
|
||||
export var beez: Array<B>;
|
||||
>beez : B[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>B : B
|
||||
|
||||
export var beez2 = new Array<B>();
|
||||
>beez2 : B[]
|
||||
>new Array<B>() : B[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
>B : B
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export function Point() {
|
||||
>Point : typeof Point
|
||||
@@ -14,10 +14,10 @@ module A {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts ===
|
||||
module B {
|
||||
>B : typeof B
|
||||
>B : B
|
||||
|
||||
export module Point {
|
||||
>Point : typeof Point
|
||||
>Point : Point
|
||||
|
||||
export var Origin = { x: 0, y: 0 };
|
||||
>Origin : { x: number; y: number; }
|
||||
@@ -35,9 +35,9 @@ var fn: () => { x: number; y: number };
|
||||
|
||||
var fn = A.Point;
|
||||
>fn : () => { x: number; y: number; }
|
||||
>A.Point : typeof Point
|
||||
>A.Point : typeof A.Point
|
||||
>A : typeof A
|
||||
>Point : typeof Point
|
||||
>Point : typeof A.Point
|
||||
|
||||
var cl: { x: number; y: number; }
|
||||
>cl : { x: number; y: number; }
|
||||
@@ -47,8 +47,8 @@ var cl: { x: number; y: number; }
|
||||
var cl = B.Point.Origin;
|
||||
>cl : { x: number; y: number; }
|
||||
>B.Point.Origin : { x: number; y: number; }
|
||||
>B.Point : typeof Point
|
||||
>B.Point : typeof B.Point
|
||||
>B : typeof B
|
||||
>Point : typeof Point
|
||||
>Point : typeof B.Point
|
||||
>Origin : { x: number; y: number; }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts ===
|
||||
module enumdule {
|
||||
>enumdule : typeof enumdule
|
||||
>enumdule : enumdule
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -36,8 +36,8 @@ var y: { x: number; y: number };
|
||||
|
||||
var y = new enumdule.Point(0, 0);
|
||||
>y : { x: number; y: number; }
|
||||
>new enumdule.Point(0, 0) : Point
|
||||
>enumdule.Point : typeof Point
|
||||
>new enumdule.Point(0, 0) : enumdule.Point
|
||||
>enumdule.Point : typeof enumdule.Point
|
||||
>enumdule : typeof enumdule
|
||||
>Point : typeof Point
|
||||
>Point : typeof enumdule.Point
|
||||
|
||||
|
||||
+17
-17
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export class Point {
|
||||
>Point : Point
|
||||
@@ -14,26 +14,26 @@ module A {
|
||||
}
|
||||
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
class Point {
|
||||
>Point : Point
|
||||
|
||||
fromCarthesian(p: A.Point) {
|
||||
>fromCarthesian : (p: Point) => { x: number; y: number; }
|
||||
>p : Point
|
||||
>fromCarthesian : (p: A.Point) => { x: number; y: number; }
|
||||
>p : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
return { x: p.x, y: p.y };
|
||||
>{ x: p.x, y: p.y } : { x: number; y: number; }
|
||||
>x : number
|
||||
>p.x : number
|
||||
>p : Point
|
||||
>p : A.Point
|
||||
>x : number
|
||||
>y : number
|
||||
>p.y : number
|
||||
>p : Point
|
||||
>p : A.Point
|
||||
>y : number
|
||||
}
|
||||
}
|
||||
@@ -48,12 +48,12 @@ var p: { x: number; y: number; };
|
||||
var p: A.Point;
|
||||
>p : { x: number; y: number; }
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
module X.Y.Z {
|
||||
>X : typeof X
|
||||
>Y : typeof Y
|
||||
>Z : typeof Z
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
|
||||
export class Line {
|
||||
>Line : Line
|
||||
@@ -64,13 +64,13 @@ module X.Y.Z {
|
||||
}
|
||||
|
||||
module X {
|
||||
>X : typeof X
|
||||
>X : X
|
||||
|
||||
export module Y {
|
||||
>Y : typeof Y
|
||||
>Y : Y
|
||||
|
||||
export module Z {
|
||||
>Z : typeof Z
|
||||
>Z : Z
|
||||
|
||||
class Line {
|
||||
>Line : Line
|
||||
@@ -90,8 +90,8 @@ var l: { length: number; }
|
||||
var l: X.Y.Z.Line;
|
||||
>l : { length: number; }
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
>Line : Line
|
||||
>Y : X.Y
|
||||
>Z : X.Y.Z
|
||||
>Line : X.Y.Z.Line
|
||||
|
||||
|
||||
|
||||
+22
-22
@@ -31,17 +31,17 @@ module A {
|
||||
|
||||
// ensure merges as expected
|
||||
var p: { x: number; y: number; toCarth(): A.Point; };
|
||||
>p : { x: number; y: number; toCarth(): Point; }
|
||||
>p : { x: number; y: number; toCarth(): A.Point; }
|
||||
>x : number
|
||||
>y : number
|
||||
>toCarth : () => Point
|
||||
>toCarth : () => A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var p: A.Point;
|
||||
>p : { x: number; y: number; toCarth(): Point; }
|
||||
>p : { x: number; y: number; toCarth(): A.Point; }
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
module X.Y.Z {
|
||||
>X : X
|
||||
@@ -52,12 +52,12 @@ module X.Y.Z {
|
||||
>Line : Line
|
||||
|
||||
new (start: A.Point, end: A.Point);
|
||||
>start : Point
|
||||
>start : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>end : Point
|
||||
>Point : A.Point
|
||||
>end : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,32 +72,32 @@ module X {
|
||||
>Line : Line
|
||||
|
||||
start: A.Point;
|
||||
>start : Point
|
||||
>start : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
end: A.Point;
|
||||
>end : Point
|
||||
>end : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ensure merges as expected
|
||||
var l: { new (s: A.Point, e: A.Point); }
|
||||
>l : new (s: Point, e: Point) => any
|
||||
>s : Point
|
||||
>l : new (s: A.Point, e: A.Point) => any
|
||||
>s : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>e : Point
|
||||
>Point : A.Point
|
||||
>e : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var l: X.Y.Z.Line;
|
||||
>l : new (s: Point, e: Point) => any
|
||||
>l : new (s: A.Point, e: A.Point) => any
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
>Line : Line
|
||||
>Y : X.Y
|
||||
>Z : X.Y.Z
|
||||
>Line : X.Y.Z.Line
|
||||
|
||||
|
||||
+25
-25
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
@@ -13,7 +13,7 @@ module A {
|
||||
}
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export function mirror<T extends Point>(p: T) {
|
||||
>mirror : typeof mirror
|
||||
@@ -44,14 +44,14 @@ module A {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
// not a collision, since we don't export
|
||||
var Origin: string = "0,0";
|
||||
>Origin : string
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export class Plane {
|
||||
>Plane : Plane
|
||||
@@ -76,47 +76,47 @@ var o: { x: number; y: number };
|
||||
var o: A.Point;
|
||||
>o : { x: number; y: number; }
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var o = A.Origin;
|
||||
>o : { x: number; y: number; }
|
||||
>A.Origin : Point
|
||||
>A.Origin : A.Point
|
||||
>A : typeof A
|
||||
>Origin : Point
|
||||
>Origin : A.Point
|
||||
|
||||
var o = A.Utils.mirror(o);
|
||||
>o : { x: number; y: number; }
|
||||
>A.Utils.mirror(o) : { x: number; y: number; }
|
||||
>A.Utils.mirror : typeof mirror
|
||||
>A.Utils : typeof Utils
|
||||
>A.Utils.mirror : typeof A.Utils.mirror
|
||||
>A.Utils : typeof A.Utils
|
||||
>A : typeof A
|
||||
>Utils : typeof Utils
|
||||
>mirror : typeof mirror
|
||||
>Utils : typeof A.Utils
|
||||
>mirror : typeof A.Utils.mirror
|
||||
>o : { x: number; y: number; }
|
||||
|
||||
var p: { tl: A.Point; br: A.Point };
|
||||
>p : { tl: Point; br: Point; }
|
||||
>tl : Point
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>tl : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>br : Point
|
||||
>Point : A.Point
|
||||
>br : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var p: A.Utils.Plane;
|
||||
>p : { tl: Point; br: Point; }
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>A : A
|
||||
>Utils : Utils
|
||||
>Plane : Plane
|
||||
>Utils : A.Utils
|
||||
>Plane : A.Utils.Plane
|
||||
|
||||
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
|
||||
>p : { tl: Point; br: Point; }
|
||||
>new A.Utils.Plane(o, { x: 1, y: 1 }) : Plane
|
||||
>A.Utils.Plane : typeof Plane
|
||||
>A.Utils : typeof Utils
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>new A.Utils.Plane(o, { x: 1, y: 1 }) : A.Utils.Plane
|
||||
>A.Utils.Plane : typeof A.Utils.Plane
|
||||
>A.Utils : typeof A.Utils
|
||||
>A : typeof A
|
||||
>Utils : typeof Utils
|
||||
>Plane : typeof Plane
|
||||
>Utils : typeof A.Utils
|
||||
>Plane : typeof A.Utils.Plane
|
||||
>o : { x: number; y: number; }
|
||||
>{ x: 1, y: 1 } : { x: number; y: number; }
|
||||
>x : number
|
||||
|
||||
+28
-28
@@ -31,20 +31,20 @@ module A {
|
||||
|
||||
// ensure merges as expected
|
||||
var p: { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; };
|
||||
>p : { x: number; y: number; toCarth(): Point; fromCarth(): Point; }
|
||||
>p : { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; }
|
||||
>x : number
|
||||
>y : number
|
||||
>toCarth : () => Point
|
||||
>toCarth : () => A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>fromCarth : () => Point
|
||||
>Point : A.Point
|
||||
>fromCarth : () => A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var p: A.Point;
|
||||
>p : { x: number; y: number; toCarth(): Point; fromCarth(): Point; }
|
||||
>p : { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; }
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
module X.Y.Z {
|
||||
>X : X
|
||||
@@ -55,12 +55,12 @@ module X.Y.Z {
|
||||
>Line : Line
|
||||
|
||||
new (start: A.Point, end: A.Point);
|
||||
>start : Point
|
||||
>start : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>end : Point
|
||||
>Point : A.Point
|
||||
>end : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,38 +75,38 @@ module X {
|
||||
>Line : Line
|
||||
|
||||
start: A.Point;
|
||||
>start : Point
|
||||
>start : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
end: A.Point;
|
||||
>end : Point
|
||||
>end : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ensure merges as expected
|
||||
var l: { start: A.Point; end: A.Point; new (s: A.Point, e: A.Point); }
|
||||
>l : { new (s: Point, e: Point): any; start: Point; end: Point; }
|
||||
>start : Point
|
||||
>l : { new (s: A.Point, e: A.Point): any; start: A.Point; end: A.Point; }
|
||||
>start : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>end : Point
|
||||
>Point : A.Point
|
||||
>end : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>s : Point
|
||||
>Point : A.Point
|
||||
>s : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>e : Point
|
||||
>Point : A.Point
|
||||
>e : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var l: X.Y.Z.Line;
|
||||
>l : { new (s: Point, e: Point): any; start: Point; end: Point; }
|
||||
>l : { new (s: A.Point, e: A.Point): any; start: A.Point; end: A.Point; }
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
>Line : Line
|
||||
>Y : X.Y
|
||||
>Z : X.Y.Z
|
||||
>Line : X.Y.Z.Line
|
||||
|
||||
|
||||
+15
-15
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts ===
|
||||
module A.B {
|
||||
>A : typeof A
|
||||
>B : typeof B
|
||||
>A : A
|
||||
>B : B
|
||||
|
||||
export var x: number;
|
||||
>x : number
|
||||
}
|
||||
|
||||
module A{
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
module B {
|
||||
>B : typeof B
|
||||
>B : B
|
||||
|
||||
export var x: string;
|
||||
>x : string
|
||||
@@ -25,15 +25,15 @@ var x: number;
|
||||
var x = A.B.x;
|
||||
>x : number
|
||||
>A.B.x : number
|
||||
>A.B : typeof B
|
||||
>A.B : typeof A.B
|
||||
>A : typeof A
|
||||
>B : typeof B
|
||||
>B : typeof A.B
|
||||
>x : number
|
||||
|
||||
module X.Y.Z {
|
||||
>X : typeof X
|
||||
>Y : typeof Y
|
||||
>Z : typeof Z
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
|
||||
export class Line {
|
||||
>Line : Line
|
||||
@@ -44,13 +44,13 @@ module X.Y.Z {
|
||||
}
|
||||
|
||||
module X {
|
||||
>X : typeof X
|
||||
>X : X
|
||||
|
||||
export module Y {
|
||||
>Y : typeof Y
|
||||
>Y : Y
|
||||
|
||||
module Z {
|
||||
>Z : typeof Z
|
||||
>Z : Z
|
||||
|
||||
export class Line {
|
||||
>Line : Line
|
||||
@@ -70,7 +70,7 @@ var l: { length: number };
|
||||
var l: X.Y.Z.Line;
|
||||
>l : { length: number; }
|
||||
>X : X
|
||||
>Y : Y
|
||||
>Z : Z
|
||||
>Line : Line
|
||||
>Y : X.Y
|
||||
>Z : X.Y.Z
|
||||
>Line : X.Y.Z.Line
|
||||
|
||||
|
||||
+15
-15
@@ -1,9 +1,9 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
|
||||
module Root {
|
||||
>Root : typeof Root
|
||||
>Root : Root
|
||||
|
||||
export module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
@@ -16,7 +16,7 @@ module Root {
|
||||
}
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export function mirror<T extends Point>(p: T) {
|
||||
>mirror : typeof mirror
|
||||
@@ -42,36 +42,36 @@ module Root {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
|
||||
module otherRoot {
|
||||
>otherRoot : typeof otherRoot
|
||||
>otherRoot : otherRoot
|
||||
|
||||
export module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
// have to be fully qualified since in different root
|
||||
export var Origin: Root.A.Point = { x: 0, y: 0 };
|
||||
>Origin : Point
|
||||
>Origin : Root.A.Point
|
||||
>Root : Root
|
||||
>A : A
|
||||
>Point : Point
|
||||
>A : Root.A
|
||||
>Point : Root.A.Point
|
||||
>{ x: 0, y: 0 } : { x: number; y: number; }
|
||||
>x : number
|
||||
>y : number
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export class Plane {
|
||||
>Plane : Plane
|
||||
|
||||
constructor(public tl: Root.A.Point, public br: Root.A.Point) { }
|
||||
>tl : Point
|
||||
>tl : Root.A.Point
|
||||
>Root : Root
|
||||
>A : A
|
||||
>Point : Point
|
||||
>br : Point
|
||||
>A : Root.A
|
||||
>Point : Root.A.Point
|
||||
>br : Root.A.Point
|
||||
>Root : Root
|
||||
>A : A
|
||||
>Point : Point
|
||||
>A : Root.A
|
||||
>Point : Root.A.Point
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+25
-25
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export interface Point {
|
||||
>Point : Point
|
||||
@@ -13,7 +13,7 @@ module A {
|
||||
}
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export function mirror<T extends Point>(p: T) {
|
||||
>mirror : typeof mirror
|
||||
@@ -38,7 +38,7 @@ module A {
|
||||
|
||||
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : A
|
||||
|
||||
export var Origin: Point = { x: 0, y: 0 };
|
||||
>Origin : Point
|
||||
@@ -48,7 +48,7 @@ module A {
|
||||
>y : number
|
||||
|
||||
export module Utils {
|
||||
>Utils : typeof Utils
|
||||
>Utils : Utils
|
||||
|
||||
export class Plane {
|
||||
>Plane : Plane
|
||||
@@ -73,47 +73,47 @@ var o: { x: number; y: number };
|
||||
var o: A.Point;
|
||||
>o : { x: number; y: number; }
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var o = A.Origin;
|
||||
>o : { x: number; y: number; }
|
||||
>A.Origin : Point
|
||||
>A.Origin : A.Point
|
||||
>A : typeof A
|
||||
>Origin : Point
|
||||
>Origin : A.Point
|
||||
|
||||
var o = A.Utils.mirror(o);
|
||||
>o : { x: number; y: number; }
|
||||
>A.Utils.mirror(o) : { x: number; y: number; }
|
||||
>A.Utils.mirror : typeof mirror
|
||||
>A.Utils : typeof Utils
|
||||
>A.Utils.mirror : typeof A.Utils.mirror
|
||||
>A.Utils : typeof A.Utils
|
||||
>A : typeof A
|
||||
>Utils : typeof Utils
|
||||
>mirror : typeof mirror
|
||||
>Utils : typeof A.Utils
|
||||
>mirror : typeof A.Utils.mirror
|
||||
>o : { x: number; y: number; }
|
||||
|
||||
var p: { tl: A.Point; br: A.Point };
|
||||
>p : { tl: Point; br: Point; }
|
||||
>tl : Point
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>tl : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>br : Point
|
||||
>Point : A.Point
|
||||
>br : A.Point
|
||||
>A : A
|
||||
>Point : Point
|
||||
>Point : A.Point
|
||||
|
||||
var p: A.Utils.Plane;
|
||||
>p : { tl: Point; br: Point; }
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>A : A
|
||||
>Utils : Utils
|
||||
>Plane : Plane
|
||||
>Utils : A.Utils
|
||||
>Plane : A.Utils.Plane
|
||||
|
||||
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
|
||||
>p : { tl: Point; br: Point; }
|
||||
>new A.Utils.Plane(o, { x: 1, y: 1 }) : Plane
|
||||
>A.Utils.Plane : typeof Plane
|
||||
>A.Utils : typeof Utils
|
||||
>p : { tl: A.Point; br: A.Point; }
|
||||
>new A.Utils.Plane(o, { x: 1, y: 1 }) : A.Utils.Plane
|
||||
>A.Utils.Plane : typeof A.Utils.Plane
|
||||
>A.Utils : typeof A.Utils
|
||||
>A : typeof A
|
||||
>Utils : typeof Utils
|
||||
>Plane : typeof Plane
|
||||
>Utils : typeof A.Utils
|
||||
>Plane : typeof A.Utils.Plane
|
||||
>o : { x: number; y: number; }
|
||||
>{ x: 1, y: 1 } : { x: number; y: number; }
|
||||
>x : number
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/acceptableAlias1.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export module N {
|
||||
>N : N
|
||||
@@ -13,5 +13,5 @@ module M {
|
||||
import r = M.X;
|
||||
>r : r
|
||||
>M : typeof M
|
||||
>X : X
|
||||
>X : r
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class C {
|
||||
>a : string
|
||||
|
||||
static foo() { }
|
||||
>foo : typeof foo
|
||||
>foo : () => void
|
||||
}
|
||||
enum E { a, b, c }
|
||||
>E : E
|
||||
@@ -18,7 +18,7 @@ enum E { a, b, c }
|
||||
>c : E
|
||||
|
||||
module M { export var a }
|
||||
>M : typeof M
|
||||
>M : M
|
||||
>a : any
|
||||
|
||||
var a: any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/aliasInaccessibleModule.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
module N {
|
||||
>N : N
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
=== tests/cases/compiler/aliasInaccessibleModule2.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
module N {
|
||||
>N : typeof N
|
||||
>N : N
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
@@ -11,10 +11,10 @@ module M {
|
||||
|
||||
}
|
||||
import R = N;
|
||||
>R : typeof N
|
||||
>R : R
|
||||
>N : typeof N
|
||||
|
||||
export import X = R;
|
||||
>X : typeof N
|
||||
>X : X
|
||||
>R : typeof N
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
=== tests/cases/compiler/aliasUsageInArray_main.ts ===
|
||||
import Backbone = require("aliasUsageInArray_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInArray_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInArray_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInArray_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
|
||||
var xs: IHasVisualizationModel[] = [moduleA];
|
||||
>xs : IHasVisualizationModel[]
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>[moduleA] : IHasVisualizationModel[]
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var xs2: typeof moduleA[] = [moduleA];
|
||||
>xs2 : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"[]
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"
|
||||
>[moduleA] : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"[]
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInArray_moduleA"
|
||||
>xs2 : typeof moduleA[]
|
||||
>moduleA : typeof moduleA
|
||||
>[moduleA] : typeof moduleA[]
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInArray_backbone.ts ===
|
||||
export class Model {
|
||||
@@ -36,12 +36,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInArray_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInArray_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInArray_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/aliasUsageInFunctionExpression_main.ts ===
|
||||
import Backbone = require("aliasUsageInFunctionExpression_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInFunctionExpression_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInFunctionExpression_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInFunctionExpression_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInFunctionExpression_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
var f = (x: IHasVisualizationModel) => x;
|
||||
>f : (x: IHasVisualizationModel) => IHasVisualizationModel
|
||||
@@ -21,11 +21,11 @@ var f = (x: IHasVisualizationModel) => x;
|
||||
>x : IHasVisualizationModel
|
||||
|
||||
f = (x) => moduleA;
|
||||
>f = (x) => moduleA : (x: IHasVisualizationModel) => typeof "tests/cases/compiler/aliasUsageInFunctionExpression_moduleA"
|
||||
>f = (x) => moduleA : (x: IHasVisualizationModel) => typeof moduleA
|
||||
>f : (x: IHasVisualizationModel) => IHasVisualizationModel
|
||||
>(x) => moduleA : (x: IHasVisualizationModel) => typeof "tests/cases/compiler/aliasUsageInFunctionExpression_moduleA"
|
||||
>(x) => moduleA : (x: IHasVisualizationModel) => typeof moduleA
|
||||
>x : IHasVisualizationModel
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInFunctionExpression_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInFunctionExpression_backbone.ts ===
|
||||
export class Model {
|
||||
@@ -37,12 +37,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInFunctionExpression_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInFunctionExpression_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInFunctionExpression_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/aliasUsageInGenericFunction_main.ts ===
|
||||
import Backbone = require("aliasUsageInGenericFunction_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInGenericFunction_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInGenericFunction_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInGenericFunction_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInGenericFunction_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
function foo<T extends { a: IHasVisualizationModel }>(x: T) {
|
||||
>foo : typeof foo
|
||||
@@ -25,12 +25,12 @@ function foo<T extends { a: IHasVisualizationModel }>(x: T) {
|
||||
>x : T
|
||||
}
|
||||
var r = foo({ a: moduleA });
|
||||
>r : { a: typeof "tests/cases/compiler/aliasUsageInGenericFunction_moduleA"; }
|
||||
>foo({ a: moduleA }) : { a: typeof "tests/cases/compiler/aliasUsageInGenericFunction_moduleA"; }
|
||||
>r : { a: typeof moduleA; }
|
||||
>foo({ a: moduleA }) : { a: typeof moduleA; }
|
||||
>foo : typeof foo
|
||||
>{ a: moduleA } : { a: typeof "tests/cases/compiler/aliasUsageInGenericFunction_moduleA"; }
|
||||
>a : typeof "tests/cases/compiler/aliasUsageInGenericFunction_moduleA"
|
||||
>moduleA : moduleA
|
||||
>{ a: moduleA } : { a: typeof moduleA; }
|
||||
>a : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var r2 = foo({ a: <IHasVisualizationModel>null });
|
||||
>r2 : { a: IHasVisualizationModel; }
|
||||
@@ -51,12 +51,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInGenericFunction_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInGenericFunction_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInGenericFunction_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/aliasUsageInIndexerOfClass_main.ts ===
|
||||
import Backbone = require("aliasUsageInIndexerOfClass_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInIndexerOfClass_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
class N {
|
||||
>N : N
|
||||
@@ -21,15 +21,15 @@ class N {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
x = moduleA;
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA"
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA"
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
}
|
||||
class N2 {
|
||||
>N2 : N2
|
||||
|
||||
[idx: string]: typeof moduleA
|
||||
>idx : string
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
x: IHasVisualizationModel;
|
||||
>x : IHasVisualizationModel
|
||||
@@ -45,12 +45,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInIndexerOfClass_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInIndexerOfClass_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
=== tests/cases/compiler/aliasUsageInObjectLiteral_main.ts ===
|
||||
import Backbone = require("aliasUsageInObjectLiteral_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInObjectLiteral_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
var a: { x: typeof moduleA } = { x: moduleA };
|
||||
>a : { x: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>{ x: moduleA } : { x: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>moduleA : moduleA
|
||||
>a : { x: typeof moduleA; }
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
>{ x: moduleA } : { x: typeof moduleA; }
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var b: { x: IHasVisualizationModel } = { x: moduleA };
|
||||
>b : { x: IHasVisualizationModel; }
|
||||
>x : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>{ x: moduleA } : { x: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>moduleA : moduleA
|
||||
>{ x: moduleA } : { x: typeof moduleA; }
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } };
|
||||
>c : { y: { z: IHasVisualizationModel; }; }
|
||||
>y : { z: IHasVisualizationModel; }
|
||||
>z : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>{ y: { z: moduleA } } : { y: { z: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }; }
|
||||
>y : { z: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }
|
||||
>{ z: moduleA } : { z: typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"; }
|
||||
>z : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_moduleA"
|
||||
>moduleA : moduleA
|
||||
>{ y: { z: moduleA } } : { y: { z: typeof moduleA; }; }
|
||||
>y : { z: typeof moduleA; }
|
||||
>{ z: moduleA } : { z: typeof moduleA; }
|
||||
>z : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInObjectLiteral_backbone.ts ===
|
||||
export class Model {
|
||||
@@ -50,12 +50,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInObjectLiteral_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInObjectLiteral_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInObjectLiteral_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/aliasUsageInOrExpression_main.ts ===
|
||||
import Backbone = require("aliasUsageInOrExpression_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInOrExpression_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInOrExpression_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInOrExpression_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
var i: IHasVisualizationModel;
|
||||
>i : IHasVisualizationModel
|
||||
@@ -21,20 +21,20 @@ var d1 = i || moduleA;
|
||||
>d1 : IHasVisualizationModel
|
||||
>i || moduleA : IHasVisualizationModel
|
||||
>i : IHasVisualizationModel
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var d2: IHasVisualizationModel = i || moduleA;
|
||||
>d2 : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>i || moduleA : IHasVisualizationModel
|
||||
>i : IHasVisualizationModel
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var d2: IHasVisualizationModel = moduleA || i;
|
||||
>d2 : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>moduleA || i : IHasVisualizationModel
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : typeof moduleA
|
||||
>i : IHasVisualizationModel
|
||||
|
||||
var e: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null || { x: moduleA };
|
||||
@@ -45,9 +45,9 @@ var e: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null || {
|
||||
><{ x: IHasVisualizationModel }>null : { x: IHasVisualizationModel; }
|
||||
>x : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>{ x: moduleA } : { x: typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"; }
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : moduleA
|
||||
>{ x: moduleA } : { x: typeof moduleA; }
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x: moduleA } : null;
|
||||
>f : { x: IHasVisualizationModel; }
|
||||
@@ -57,9 +57,9 @@ var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x
|
||||
><{ x: IHasVisualizationModel }>null : { x: IHasVisualizationModel; }
|
||||
>x : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>{ x: moduleA } : { x: typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"; }
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInOrExpression_moduleA"
|
||||
>moduleA : moduleA
|
||||
>{ x: moduleA } : { x: typeof moduleA; }
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInOrExpression_backbone.ts ===
|
||||
export class Model {
|
||||
@@ -71,12 +71,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInOrExpression_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInOrExpression_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInOrExpression_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_main.ts ===
|
||||
import Backbone = require("aliasUsageInTypeArgumentOfExtendsClause_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInTypeArgumentOfExtendsClause_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
class C<T extends IHasVisualizationModel> {
|
||||
>C : C<T>
|
||||
@@ -28,8 +28,8 @@ class D extends C<IHasVisualizationModel> {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
x = moduleA;
|
||||
>x : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA"
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA"
|
||||
>x : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
}
|
||||
=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone.ts ===
|
||||
export class Model {
|
||||
@@ -41,12 +41,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInTypeArgumentOfExtendsClause_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
=== tests/cases/compiler/aliasUsageInVarAssignment_main.ts ===
|
||||
import Backbone = require("aliasUsageInVarAssignment_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInVarAssignment_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
import moduleA = require("aliasUsageInVarAssignment_moduleA");
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInVarAssignment_moduleA"
|
||||
>moduleA : moduleA
|
||||
|
||||
interface IHasVisualizationModel {
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
VisualizationModel: typeof Backbone.Model;
|
||||
>VisualizationModel : typeof Model
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInVarAssignment_backbone"
|
||||
>Model : typeof Model
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
>Backbone : typeof Backbone
|
||||
>Model : typeof Backbone.Model
|
||||
}
|
||||
var i: IHasVisualizationModel;
|
||||
>i : IHasVisualizationModel
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
|
||||
var m: typeof moduleA = i;
|
||||
>m : typeof "tests/cases/compiler/aliasUsageInVarAssignment_moduleA"
|
||||
>moduleA : typeof "tests/cases/compiler/aliasUsageInVarAssignment_moduleA"
|
||||
>m : typeof moduleA
|
||||
>moduleA : typeof moduleA
|
||||
>i : IHasVisualizationModel
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInVarAssignment_backbone.ts ===
|
||||
@@ -32,12 +32,12 @@ export class Model {
|
||||
|
||||
=== tests/cases/compiler/aliasUsageInVarAssignment_moduleA.ts ===
|
||||
import Backbone = require("aliasUsageInVarAssignment_backbone");
|
||||
>Backbone : typeof "tests/cases/compiler/aliasUsageInVarAssignment_backbone"
|
||||
>Backbone : Backbone
|
||||
|
||||
export class VisualizationModel extends Backbone.Model {
|
||||
>VisualizationModel : VisualizationModel
|
||||
>Backbone : Backbone
|
||||
>Model : Model
|
||||
>Model : Backbone.Model
|
||||
|
||||
// interesting stuff here
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
///<reference path='aliasUsedAsNameValue_0.ts' />
|
||||
///<reference path='aliasUsedAsNameValue_1.ts' />
|
||||
import mod = require("aliasUsedAsNameValue_0");
|
||||
>mod : typeof "tests/cases/compiler/aliasUsedAsNameValue_0"
|
||||
>mod : mod
|
||||
|
||||
import b = require("aliasUsedAsNameValue_1");
|
||||
>b : typeof "tests/cases/compiler/aliasUsedAsNameValue_1"
|
||||
>b : b
|
||||
|
||||
export var a = function () {
|
||||
>a : () => void
|
||||
@@ -14,10 +14,10 @@ export var a = function () {
|
||||
//var x = mod.id; // TODO needed hack that mod is loaded
|
||||
b.b(mod);
|
||||
>b.b(mod) : any
|
||||
>b.b : typeof b
|
||||
>b : typeof "tests/cases/compiler/aliasUsedAsNameValue_1"
|
||||
>b.b : typeof b.b
|
||||
>b : typeof b
|
||||
>mod : typeof "tests/cases/compiler/aliasUsedAsNameValue_0"
|
||||
>b : typeof b.b
|
||||
>mod : typeof mod
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/aliasUsedAsNameValue_0.ts ===
|
||||
|
||||
@@ -67,7 +67,7 @@ declare class cls {
|
||||
>cls : cls
|
||||
|
||||
static static(p): number;
|
||||
>static : typeof static
|
||||
>static : (p: any) => number
|
||||
>p : any
|
||||
|
||||
static q;
|
||||
@@ -77,7 +77,7 @@ declare class cls {
|
||||
>fn : () => any
|
||||
|
||||
private static fns();
|
||||
>fns : typeof fns
|
||||
>fns : () => any
|
||||
}
|
||||
|
||||
// Ambient enum
|
||||
@@ -122,7 +122,7 @@ declare enum E3 {
|
||||
>A : E3
|
||||
}
|
||||
declare module E3 {
|
||||
>E3 : typeof E3
|
||||
>E3 : E3
|
||||
|
||||
var B;
|
||||
>B : any
|
||||
@@ -135,7 +135,7 @@ var x = E3.B;
|
||||
|
||||
// Ambient module
|
||||
declare module M1 {
|
||||
>M1 : typeof M1
|
||||
>M1 : M1
|
||||
|
||||
var x;
|
||||
>x : any
|
||||
@@ -154,9 +154,9 @@ var p = M1.x;
|
||||
var q = M1.fn();
|
||||
>q : number
|
||||
>M1.fn() : number
|
||||
>M1.fn : typeof fn
|
||||
>M1.fn : typeof M1.fn
|
||||
>M1 : typeof M1
|
||||
>fn : typeof fn
|
||||
>fn : typeof M1.fn
|
||||
|
||||
// Ambient external module in the global module
|
||||
// Ambient external module with a string literal name that is a top level external module name
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/ambientEnumElementInitializer6.ts ===
|
||||
declare module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
enum E {
|
||||
>E : E
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_1.ts ===
|
||||
///<reference path='ambientExternalModuleWithInternalImportDeclaration_0.ts'/>
|
||||
import A = require('M');
|
||||
>A : typeof C
|
||||
>A : A
|
||||
|
||||
var c = new A();
|
||||
>c : C
|
||||
>new A() : C
|
||||
>A : typeof C
|
||||
>c : A
|
||||
>new A() : A
|
||||
>A : typeof A
|
||||
|
||||
=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts ===
|
||||
declare module 'M' {
|
||||
module C {
|
||||
>C : typeof C
|
||||
>C : X
|
||||
|
||||
export var f: number;
|
||||
>f : number
|
||||
}
|
||||
class C {
|
||||
>C : C
|
||||
>C : X
|
||||
|
||||
foo(): void;
|
||||
>foo : () => void
|
||||
}
|
||||
import X = C;
|
||||
>X : typeof C
|
||||
>C : C
|
||||
>X : X
|
||||
>C : X
|
||||
|
||||
export = X;
|
||||
>X : C
|
||||
>X : X
|
||||
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_1.ts ===
|
||||
///<reference path='ambientExternalModuleWithoutInternalImportDeclaration_0.ts'/>
|
||||
import A = require('M');
|
||||
>A : typeof C
|
||||
>A : A
|
||||
|
||||
var c = new A();
|
||||
>c : C
|
||||
>new A() : C
|
||||
>A : typeof C
|
||||
>c : A
|
||||
>new A() : A
|
||||
>A : typeof A
|
||||
|
||||
=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts ===
|
||||
declare module 'M' {
|
||||
module C {
|
||||
>C : typeof C
|
||||
>C : C
|
||||
|
||||
export var f: number;
|
||||
>f : number
|
||||
|
||||
@@ -3,7 +3,7 @@ declare function f();
|
||||
>f : typeof f
|
||||
|
||||
declare module f { var x }
|
||||
>f : typeof f
|
||||
>f : f
|
||||
>x : any
|
||||
|
||||
declare function f(x);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/ambientModuleExports.ts ===
|
||||
declare module Foo {
|
||||
>Foo : typeof Foo
|
||||
>Foo : Foo
|
||||
|
||||
function a():void;
|
||||
>a : typeof a
|
||||
@@ -14,9 +14,9 @@ declare module Foo {
|
||||
|
||||
Foo.a();
|
||||
>Foo.a() : void
|
||||
>Foo.a : typeof a
|
||||
>Foo.a : typeof Foo.a
|
||||
>Foo : typeof Foo
|
||||
>a : typeof a
|
||||
>a : typeof Foo.a
|
||||
|
||||
Foo.b;
|
||||
>Foo.b : number
|
||||
@@ -24,14 +24,14 @@ Foo.b;
|
||||
>b : number
|
||||
|
||||
var c = new Foo.C();
|
||||
>c : C
|
||||
>new Foo.C() : C
|
||||
>Foo.C : typeof C
|
||||
>c : Foo.C
|
||||
>new Foo.C() : Foo.C
|
||||
>Foo.C : typeof Foo.C
|
||||
>Foo : typeof Foo
|
||||
>C : typeof C
|
||||
>C : typeof Foo.C
|
||||
|
||||
declare module Foo2 {
|
||||
>Foo2 : typeof Foo2
|
||||
>Foo2 : Foo2
|
||||
|
||||
export function a(): void;
|
||||
>a : typeof a
|
||||
@@ -45,9 +45,9 @@ declare module Foo2 {
|
||||
|
||||
Foo2.a();
|
||||
>Foo2.a() : void
|
||||
>Foo2.a : typeof a
|
||||
>Foo2.a : typeof Foo2.a
|
||||
>Foo2 : typeof Foo2
|
||||
>a : typeof a
|
||||
>a : typeof Foo2.a
|
||||
|
||||
Foo2.b;
|
||||
>Foo2.b : number
|
||||
@@ -55,9 +55,9 @@ Foo2.b;
|
||||
>b : number
|
||||
|
||||
var c2 = new Foo2.C();
|
||||
>c2 : C
|
||||
>new Foo2.C() : C
|
||||
>Foo2.C : typeof C
|
||||
>c2 : Foo2.C
|
||||
>new Foo2.C() : Foo2.C
|
||||
>Foo2.C : typeof Foo2.C
|
||||
>Foo2 : typeof Foo2
|
||||
>C : typeof C
|
||||
>C : typeof Foo2.C
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts ===
|
||||
declare module foo {
|
||||
>foo : typeof foo
|
||||
>foo : foo
|
||||
|
||||
class A { }
|
||||
>A : A
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
=== tests/cases/compiler/ambientModules.ts ===
|
||||
declare module Foo.Bar { export var foo; };
|
||||
>Foo : typeof Foo
|
||||
>Bar : typeof Bar
|
||||
>Foo : Foo
|
||||
>Bar : Bar
|
||||
>foo : any
|
||||
|
||||
Foo.Bar.foo = 5;
|
||||
>Foo.Bar.foo = 5 : number
|
||||
>Foo.Bar.foo : any
|
||||
>Foo.Bar : typeof Bar
|
||||
>Foo.Bar : typeof Foo.Bar
|
||||
>Foo : typeof Foo
|
||||
>Bar : typeof Bar
|
||||
>Bar : typeof Foo.Bar
|
||||
>foo : any
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
=== tests/cases/conformance/externalModules/foo_1.ts ===
|
||||
import foo = require("./foo_0");
|
||||
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||||
>foo : foo
|
||||
|
||||
if(foo.E1.A === 0){
|
||||
>foo.E1.A === 0 : boolean
|
||||
>foo.E1.A : E1
|
||||
>foo.E1 : typeof E1
|
||||
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||||
>E1 : typeof E1
|
||||
>A : E1
|
||||
>foo.E1.A : foo.E1
|
||||
>foo.E1 : typeof foo.E1
|
||||
>foo : typeof foo
|
||||
>E1 : typeof foo.E1
|
||||
>A : foo.E1
|
||||
|
||||
// Should cause runtime import - interesting optimization possibility, as gets inlined to 0.
|
||||
}
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
=== tests/cases/conformance/externalModules/foo_1.ts ===
|
||||
import foo = require("./foo_0");
|
||||
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||||
>foo : foo
|
||||
|
||||
// None of the below should cause a runtime dependency on foo_0
|
||||
import f = foo.M1;
|
||||
>f : f
|
||||
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||||
>M1 : M1
|
||||
>foo : typeof foo
|
||||
>M1 : foo.M1
|
||||
|
||||
var i: f.I2;
|
||||
>i : I2
|
||||
>i : f.I2
|
||||
>f : f
|
||||
>I2 : I2
|
||||
>I2 : f.I2
|
||||
|
||||
var x: foo.C1 = <{m1: number}>{};
|
||||
>x : C1
|
||||
>x : foo.C1
|
||||
>foo : foo
|
||||
>C1 : C1
|
||||
>C1 : foo.C1
|
||||
><{m1: number}>{} : { m1: number; }
|
||||
>m1 : number
|
||||
>{} : {}
|
||||
|
||||
var y: typeof foo.C1.s1 = false;
|
||||
>y : boolean
|
||||
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||||
>C1 : typeof C1
|
||||
>foo : typeof foo
|
||||
>C1 : typeof foo.C1
|
||||
>s1 : boolean
|
||||
|
||||
var z: foo.M1.I2;
|
||||
>z : I2
|
||||
>z : f.I2
|
||||
>foo : foo
|
||||
>M1 : M1
|
||||
>I2 : I2
|
||||
>M1 : foo.M1
|
||||
>I2 : f.I2
|
||||
|
||||
var e: number = <foo.E1>0;
|
||||
>e : number
|
||||
><foo.E1>0 : E1
|
||||
><foo.E1>0 : foo.E1
|
||||
>foo : foo
|
||||
>E1 : E1
|
||||
>E1 : foo.E1
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo_0.ts ===
|
||||
export class C1 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/anonterface.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export class C {
|
||||
>C : C
|
||||
@@ -20,16 +20,16 @@ module M {
|
||||
}
|
||||
|
||||
var c=new M.C();
|
||||
>c : C
|
||||
>new M.C() : C
|
||||
>M.C : typeof C
|
||||
>c : M.C
|
||||
>new M.C() : M.C
|
||||
>M.C : typeof M.C
|
||||
>M : typeof M
|
||||
>C : typeof C
|
||||
>C : typeof M.C
|
||||
|
||||
c.m(function(n) { return "hello: "+n; },18);
|
||||
>c.m(function(n) { return "hello: "+n; },18) : string
|
||||
>c.m : (fn: (n: number) => string, n2: number) => string
|
||||
>c : C
|
||||
>c : M.C
|
||||
>m : (fn: (n: number) => string, n2: number) => string
|
||||
>function(n) { return "hello: "+n; } : (n: number) => string
|
||||
>n : number
|
||||
|
||||
@@ -242,7 +242,7 @@ function f() { }
|
||||
>f : typeof f
|
||||
|
||||
module f {
|
||||
>f : typeof f
|
||||
>f : f
|
||||
|
||||
export var bar = 1;
|
||||
>bar : number
|
||||
@@ -268,7 +268,7 @@ class CC { baz: string }
|
||||
>baz : string
|
||||
|
||||
module CC {
|
||||
>CC : typeof CC
|
||||
>CC : CC
|
||||
|
||||
export var bar = 1;
|
||||
>bar : number
|
||||
|
||||
@@ -3,7 +3,7 @@ class A {
|
||||
>A : A
|
||||
|
||||
public static createSelectableViewModel(initialState?: any, selectedValue?: any) {
|
||||
>createSelectableViewModel : typeof createSelectableViewModel
|
||||
>createSelectableViewModel : (initialState?: any, selectedValue?: any) => { selectedValue: number; }
|
||||
>initialState : any
|
||||
>selectedValue : any
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/arrayAssignmentTest6.ts ===
|
||||
module Test {
|
||||
>Test : typeof Test
|
||||
>Test : Test
|
||||
|
||||
interface IState {
|
||||
>IState : IState
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/arrayAugment.ts ===
|
||||
interface Array<T> {
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>T : T
|
||||
|
||||
split: (parts: number) => T[][];
|
||||
|
||||
@@ -248,7 +248,7 @@ class f {
|
||||
>y : string
|
||||
>{x: anyObj, y: 'a'} : { x: any; y: string; }
|
||||
>x : any
|
||||
>anyObj : anyObj
|
||||
>anyObj : any
|
||||
>y : string
|
||||
|
||||
var a2 = [ {x: anyObj, y: 'a'}, {x: 0, y: 'a'}, {x: 'a', y: 'a'} ];
|
||||
@@ -256,7 +256,7 @@ class f {
|
||||
>[ {x: anyObj, y: 'a'}, {x: 0, y: 'a'}, {x: 'a', y: 'a'} ] : { x: any; y: string; }[]
|
||||
>{x: anyObj, y: 'a'} : { x: any; y: string; }
|
||||
>x : any
|
||||
>anyObj : anyObj
|
||||
>anyObj : any
|
||||
>y : string
|
||||
>{x: 0, y: 'a'} : { x: number; y: string; }
|
||||
>x : number
|
||||
@@ -273,7 +273,7 @@ class f {
|
||||
>y : string
|
||||
>{x: anyObj, y: 'a'} : { x: any; y: string; }
|
||||
>x : any
|
||||
>anyObj : anyObj
|
||||
>anyObj : any
|
||||
>y : string
|
||||
>{x: 'a', y: 'a'} : { x: string; y: string; }
|
||||
>x : string
|
||||
|
||||
@@ -18,7 +18,7 @@ a.concat('Hello');
|
||||
var b = new Array<string>();
|
||||
>b : string[]
|
||||
>new Array<string>() : string[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
b.concat('hello');
|
||||
>b.concat('hello') : string[]
|
||||
|
||||
@@ -6,19 +6,19 @@ x = new Array(1);
|
||||
>x = new Array(1) : any[]
|
||||
>x : string[]
|
||||
>new Array(1) : any[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
x = new Array('hi', 'bye');
|
||||
>x = new Array('hi', 'bye') : string[]
|
||||
>x : string[]
|
||||
>new Array('hi', 'bye') : string[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
x = new Array<string>('hi', 'bye');
|
||||
>x = new Array<string>('hi', 'bye') : string[]
|
||||
>x : string[]
|
||||
>new Array<string>('hi', 'bye') : string[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
var y: number[];
|
||||
>y : number[]
|
||||
@@ -27,17 +27,17 @@ y = new Array(1);
|
||||
>y = new Array(1) : any[]
|
||||
>y : number[]
|
||||
>new Array(1) : any[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
y = new Array(1,2);
|
||||
>y = new Array(1,2) : number[]
|
||||
>y : number[]
|
||||
>new Array(1,2) : number[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
y = new Array<number>(1, 2);
|
||||
>y = new Array<number>(1, 2) : number[]
|
||||
>y : number[]
|
||||
>new Array<number>(1, 2) : number[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ var x = [];
|
||||
var x = new Array(1);
|
||||
>x : any[]
|
||||
>new Array(1) : any[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
var y = [1];
|
||||
>y : number[]
|
||||
@@ -21,7 +21,7 @@ var y = [1, 2];
|
||||
var y = new Array<number>();
|
||||
>y : number[]
|
||||
>new Array<number>() : number[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
var x2: number[] = [];
|
||||
>x2 : number[]
|
||||
@@ -30,7 +30,7 @@ var x2: number[] = [];
|
||||
var x2: number[] = new Array(1);
|
||||
>x2 : number[]
|
||||
>new Array(1) : any[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
var y2: number[] = [1];
|
||||
>y2 : number[]
|
||||
@@ -43,5 +43,5 @@ var y2: number[] = [1, 2];
|
||||
var y2: number[] = new Array<number>();
|
||||
>y2 : number[]
|
||||
>new Array<number>() : number[]
|
||||
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
|
||||
>Array : { (arrayLength?: number): Array<any>; <T>(arrayLength: number): Array<T>; <T>(...items: Array<T>): Array<T>; new (arrayLength?: number): Array<any>; new <T>(arrayLength: number): Array<T>; new <T>(...items: Array<T>): Array<T>; isArray(arg: any): boolean; prototype: Array<any>; }
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ var classTypeArray = [C, C, C];
|
||||
|
||||
var classTypeArray: Array<typeof C>; // Should OK, not be a parse error
|
||||
>classTypeArray : typeof C[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>C : typeof C
|
||||
|
||||
// Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[]
|
||||
@@ -111,7 +111,7 @@ var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }];
|
||||
|
||||
var context2: Array<{}>; // Should be OK
|
||||
>context2 : {}[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
|
||||
// Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[]
|
||||
class Base { private p; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/compiler/arrayOfExportedClass_1.ts ===
|
||||
///<reference path='arrayOfExportedClass_0.ts'/>
|
||||
import Car = require('arrayOfExportedClass_0');
|
||||
>Car : typeof Car
|
||||
>Car : Car
|
||||
|
||||
class Road {
|
||||
>Road : Road
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts ===
|
||||
declare module WinJS {
|
||||
>WinJS : typeof WinJS
|
||||
>WinJS : WinJS
|
||||
|
||||
class Promise<T> {
|
||||
>Promise : Promise<T>
|
||||
@@ -25,7 +25,7 @@ declare module WinJS {
|
||||
}
|
||||
}
|
||||
declare module Data {
|
||||
>Data : typeof Data
|
||||
>Data : Data
|
||||
|
||||
export interface IListItem<T> {
|
||||
>IListItem : IListItem<T>
|
||||
@@ -62,11 +62,11 @@ declare module Data {
|
||||
|
||||
//removeIndices: WinJS.Promise<IListItem<T>[]>;
|
||||
removeIndices(indices: number[], options?: any): WinJS.Promise<IListItem<T>[]>;
|
||||
>removeIndices : (indices: number[], options?: any) => Promise<IListItem<T>[]>
|
||||
>removeIndices : (indices: number[], options?: any) => WinJS.Promise<IListItem<T>[]>
|
||||
>indices : number[]
|
||||
>options : any
|
||||
>WinJS : WinJS
|
||||
>Promise : Promise<T>
|
||||
>Promise : WinJS.Promise<T>
|
||||
>IListItem : IListItem<T>
|
||||
>T : T
|
||||
}
|
||||
@@ -78,11 +78,11 @@ declare module Data {
|
||||
|
||||
//removeIndices: WinJS.Promise<IListItem<T>[]>;
|
||||
public removeIndices(indices: number[], options?: any): WinJS.Promise<IListItem<T>[]>;
|
||||
>removeIndices : (indices: number[], options?: any) => Promise<IListItem<T>[]>
|
||||
>removeIndices : (indices: number[], options?: any) => WinJS.Promise<IListItem<T>[]>
|
||||
>indices : number[]
|
||||
>options : any
|
||||
>WinJS : WinJS
|
||||
>Promise : Promise<T>
|
||||
>Promise : WinJS.Promise<T>
|
||||
>IListItem : IListItem<T>
|
||||
>T : T
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/arrowFunctionInExpressionStatement2.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
() => 0;
|
||||
>() => 0 : () => number
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assign1.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
interface I {
|
||||
>I : I
|
||||
|
||||
@@ -106,23 +106,23 @@ var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
|
||||
var a12: (x: Array<Base>, y: Array<Derived2>) => Array<Derived>;
|
||||
>a12 : (x: Base[], y: Derived2[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived2[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived2 : Derived2
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
var a13: (x: Array<Base>, y: Array<Derived>) => Array<Derived>;
|
||||
>a13 : (x: Base[], y: Derived[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
var a14: (x: { a: string; b: number }) => Object;
|
||||
@@ -429,14 +429,14 @@ b11 = a11; // ok
|
||||
var b12: <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>;
|
||||
>b12 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a12 = b12; // ok
|
||||
@@ -452,10 +452,10 @@ b12 = a12; // ok
|
||||
var b13: <T extends Array<Derived>>(x: Array<Base>, y: T) => T;
|
||||
>b13 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
|
||||
@@ -106,23 +106,23 @@ var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base;
|
||||
var a12: new (x: Array<Base>, y: Array<Derived2>) => Array<Derived>;
|
||||
>a12 : new (x: Base[], y: Derived2[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived2[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived2 : Derived2
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
var a13: new (x: Array<Base>, y: Array<Derived>) => Array<Derived>;
|
||||
>a13 : new (x: Base[], y: Derived[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
var a14: new (x: { a: string; b: number }) => Object;
|
||||
@@ -429,14 +429,14 @@ b11 = a11; // ok
|
||||
var b12: new <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>;
|
||||
>b12 : new <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a12 = b12; // ok
|
||||
@@ -452,10 +452,10 @@ b12 = a12; // ok
|
||||
var b13: new <T extends Array<Derived>>(x: Array<Base>, y: T) => T;
|
||||
>b13 : new <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
|
||||
@@ -86,6 +86,8 @@ module ObjectTypes {
|
||||
}
|
||||
|
||||
//// [assignmentCompatWithObjectMembers.js]
|
||||
// members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M
|
||||
// no errors expected
|
||||
var SimpleTypes;
|
||||
(function (SimpleTypes) {
|
||||
var S = (function () {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// no errors expected
|
||||
|
||||
module SimpleTypes {
|
||||
>SimpleTypes : typeof SimpleTypes
|
||||
>SimpleTypes : SimpleTypes
|
||||
|
||||
class S { foo: string; }
|
||||
>S : S
|
||||
@@ -152,7 +152,7 @@ module SimpleTypes {
|
||||
}
|
||||
|
||||
module ObjectTypes {
|
||||
>ObjectTypes : typeof ObjectTypes
|
||||
>ObjectTypes : ObjectTypes
|
||||
|
||||
class S { foo: S; }
|
||||
>S : S
|
||||
@@ -204,13 +204,13 @@ module ObjectTypes {
|
||||
>a2 : any
|
||||
>{ foo: a2 } : { foo: any; }
|
||||
>foo : any
|
||||
>a2 : a2
|
||||
>a2 : any
|
||||
|
||||
var b2 = { foo: b2 };
|
||||
>b2 : any
|
||||
>{ foo: b2 } : { foo: any; }
|
||||
>foo : any
|
||||
>b2 : b2
|
||||
>b2 : any
|
||||
|
||||
s = t;
|
||||
>s = t : T
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability1.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export var aa = {};;
|
||||
>aa : {}
|
||||
@@ -31,11 +31,11 @@ module __test2__ {
|
||||
>aa : {}
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa : {}
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__aa : {}
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability2.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export var aa:{};;
|
||||
>aa : {}
|
||||
@@ -30,11 +30,11 @@ module __test2__ {
|
||||
>aa : {}
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa : {}
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__aa : {}
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability3.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export var obj = {one: 1};
|
||||
>obj : { one: number; }
|
||||
@@ -32,11 +32,11 @@ module __test2__ {
|
||||
>obj : { one: number; }
|
||||
}
|
||||
__test2__.__val__obj = __test1__.__val__obj4
|
||||
>__test2__.__val__obj = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj : { one: number; }
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__obj : { one: number; }
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability4.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export var aa:{one:number;};;
|
||||
>aa : { one: number; }
|
||||
@@ -31,11 +31,11 @@ module __test2__ {
|
||||
>aa : { one: number; }
|
||||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__aa : { one: number; }
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__aa : { one: number; }
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability5.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export interface interfaceOne<T> { one: T; }; var obj1: interfaceOne<number> = { one: 1 };;
|
||||
>interfaceOne : interfaceOne<T>
|
||||
@@ -37,11 +37,11 @@ module __test2__ {
|
||||
>obj1 : interfaceOne<number>
|
||||
}
|
||||
__test2__.__val__obj1 = __test1__.__val__obj4
|
||||
>__test2__.__val__obj1 = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj1 : interfaceOne<number>
|
||||
>__test2__.__val__obj1 = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj1 : __test2__.interfaceOne<number>
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__obj1 : interfaceOne<number>
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj1 : __test2__.interfaceOne<number>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability6.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export interface interfaceWithOptional<T> { one?: T; }; var obj3: interfaceWithOptional<number> = { };;
|
||||
>interfaceWithOptional : interfaceWithOptional<T>
|
||||
@@ -36,11 +36,11 @@ module __test2__ {
|
||||
>obj3 : interfaceWithOptional<number>
|
||||
}
|
||||
__test2__.__val__obj3 = __test1__.__val__obj4
|
||||
>__test2__.__val__obj3 = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj3 : interfaceWithOptional<number>
|
||||
>__test2__.__val__obj3 = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj3 : __test2__.interfaceWithOptional<number>
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__obj3 : interfaceWithOptional<number>
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj3 : __test2__.interfaceWithOptional<number>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability7.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -40,11 +40,11 @@ module __test2__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
__test2__.__val__obj4 = __test1__.__val__obj4
|
||||
>__test2__.__val__obj4 = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj4 = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__obj4 : __test2__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test2__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability8.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export class classWithPublic<T> { constructor(public one: T) {} } var x1 = new classWithPublic(1);;
|
||||
>classWithPublic : classWithPublic<T>
|
||||
@@ -36,11 +36,11 @@ module __test2__ {
|
||||
>x1 : classWithPublic<number>
|
||||
}
|
||||
__test2__.__val__x1 = __test1__.__val__obj4
|
||||
>__test2__.__val__x1 = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__x1 : classWithPublic<number>
|
||||
>__test2__.__val__x1 = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__x1 : __test2__.classWithPublic<number>
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__x1 : classWithPublic<number>
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__x1 : __test2__.classWithPublic<number>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/assignmentCompatability9.ts ===
|
||||
module __test1__ {
|
||||
>__test1__ : typeof __test1__
|
||||
>__test1__ : __test1__
|
||||
|
||||
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
|
||||
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
|
||||
@@ -20,7 +20,7 @@ module __test1__ {
|
||||
>obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
}
|
||||
module __test2__ {
|
||||
>__test2__ : typeof __test2__
|
||||
>__test2__ : __test2__
|
||||
|
||||
export class classWithOptional<T> { constructor(public one?: T) {} } var x3 = new classWithOptional<number>();;
|
||||
>classWithOptional : classWithOptional<T>
|
||||
@@ -36,11 +36,11 @@ module __test2__ {
|
||||
>x3 : classWithOptional<number>
|
||||
}
|
||||
__test2__.__val__x3 = __test1__.__val__obj4
|
||||
>__test2__.__val__x3 = __test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__x3 : classWithOptional<number>
|
||||
>__test2__.__val__x3 = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test2__.__val__x3 : __test2__.classWithOptional<number>
|
||||
>__test2__ : typeof __test2__
|
||||
>__val__x3 : classWithOptional<number>
|
||||
>__test1__.__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__x3 : __test2__.classWithOptional<number>
|
||||
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
>__test1__ : typeof __test1__
|
||||
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
|
||||
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ class c5 { public foo() { } }
|
||||
>foo : () => void
|
||||
|
||||
module c5 { } // should be ok
|
||||
>c5 : typeof c5
|
||||
>c5 : c5
|
||||
|
||||
class c5a { public foo() { } }
|
||||
>c5a : c5a
|
||||
>foo : () => void
|
||||
|
||||
module c5a { var y = 2; } // should be ok
|
||||
>c5a : typeof c5a
|
||||
>c5a : c5a
|
||||
>y : number
|
||||
|
||||
class c5b { public foo() { } }
|
||||
@@ -20,7 +20,7 @@ class c5b { public foo() { } }
|
||||
>foo : () => void
|
||||
|
||||
module c5b { export var y = 2; } // should be ok
|
||||
>c5b : typeof c5b
|
||||
>c5b : c5b
|
||||
>y : number
|
||||
|
||||
//// class then import
|
||||
|
||||
@@ -7,5 +7,5 @@ class c5 { public foo() { } }
|
||||
>foo : () => void
|
||||
|
||||
module c5 { } // should be ok everywhere
|
||||
>c5 : typeof c5
|
||||
>c5 : c5
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ class m3b { foo() { } }
|
||||
>foo : () => void
|
||||
|
||||
module m3b { var y = 2; }
|
||||
>m3b : typeof m3b
|
||||
>m3b : m3b
|
||||
>y : number
|
||||
|
||||
class m3c { foo() { } }
|
||||
@@ -12,7 +12,7 @@ class m3c { foo() { } }
|
||||
>foo : () => void
|
||||
|
||||
module m3c { export var y = 2; }
|
||||
>m3c : typeof m3c
|
||||
>m3c : m3c
|
||||
>y : number
|
||||
|
||||
declare class m3d { foo(): void }
|
||||
@@ -20,11 +20,11 @@ declare class m3d { foo(): void }
|
||||
>foo : () => void
|
||||
|
||||
module m3d { export var y = 2; }
|
||||
>m3d : typeof m3d
|
||||
>m3d : m3d
|
||||
>y : number
|
||||
|
||||
module m3e { export var y = 2; }
|
||||
>m3e : typeof m3e
|
||||
>m3e : m3e
|
||||
>y : number
|
||||
|
||||
declare class m3e { foo(): void }
|
||||
@@ -36,7 +36,7 @@ declare class m3f { foo(): void }
|
||||
>foo : () => void
|
||||
|
||||
module m3f { export interface I { foo(): void } }
|
||||
>m3f : typeof m3f
|
||||
>m3f : m3f
|
||||
>I : I
|
||||
>foo : () => void
|
||||
|
||||
@@ -45,7 +45,7 @@ declare class m3g { foo(): void }
|
||||
>foo : () => void
|
||||
|
||||
module m3g { export class C { foo() { } } }
|
||||
>m3g : typeof m3g
|
||||
>m3g : m3g
|
||||
>C : C
|
||||
>foo : () => void
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
// module then enum
|
||||
// should be errors
|
||||
module m4 { }
|
||||
>m4 : typeof m4
|
||||
>m4 : m4
|
||||
|
||||
enum m4 { }
|
||||
>m4 : m4
|
||||
|
||||
module m4a { var y = 2; }
|
||||
>m4a : typeof m4a
|
||||
>m4a : m4a
|
||||
>y : number
|
||||
|
||||
enum m4a { One }
|
||||
@@ -16,7 +16,7 @@ enum m4a { One }
|
||||
>One : m4a
|
||||
|
||||
module m4b { export var y = 2; }
|
||||
>m4b : typeof m4b
|
||||
>m4b : m4b
|
||||
>y : number
|
||||
|
||||
enum m4b { One }
|
||||
@@ -24,7 +24,7 @@ enum m4b { One }
|
||||
>One : m4b
|
||||
|
||||
module m4c { interface I { foo(): void } }
|
||||
>m4c : typeof m4c
|
||||
>m4c : m4c
|
||||
>I : I
|
||||
>foo : () => void
|
||||
|
||||
@@ -33,7 +33,7 @@ enum m4c { One }
|
||||
>One : m4c
|
||||
|
||||
module m4d { class C { foo() { } } }
|
||||
>m4d : typeof m4d
|
||||
>m4d : m4d
|
||||
>C : C
|
||||
>foo : () => void
|
||||
|
||||
@@ -44,11 +44,11 @@ enum m4d { One }
|
||||
//// module then module
|
||||
|
||||
module m5 { export var y = 2; }
|
||||
>m5 : typeof m5
|
||||
>m5 : m5
|
||||
>y : number
|
||||
|
||||
module m5 { export interface I { foo(): void } } // should already be reasonably well covered
|
||||
>m5 : typeof m5
|
||||
>m5 : m5
|
||||
>I : I
|
||||
>foo : () => void
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ var obj: { [s: string]: Contextual } = { s: e }; // { s: Ellement; [s: string]:
|
||||
>Contextual : Contextual
|
||||
>{ s: e } : { [x: string]: Ellement; s: Ellement; }
|
||||
>s : Ellement
|
||||
>e : e
|
||||
>e : Ellement
|
||||
|
||||
var conditional: Contextual = null ? e : e; // Ellement
|
||||
>conditional : Contextual
|
||||
|
||||
@@ -4,7 +4,7 @@ declare var console;
|
||||
|
||||
"use strict";
|
||||
module Test {
|
||||
>Test : typeof Test
|
||||
>Test : Test
|
||||
|
||||
export class Bug {
|
||||
>Bug : Bug
|
||||
|
||||
@@ -13,10 +13,10 @@ class A {
|
||||
>a : boolean
|
||||
|
||||
static foo() { return false; }
|
||||
>foo : typeof foo
|
||||
>foo : () => boolean
|
||||
}
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export var n: boolean;
|
||||
>n : boolean
|
||||
@@ -70,9 +70,9 @@ var ResultIsNumber7 = ~A.foo();
|
||||
>ResultIsNumber7 : number
|
||||
>~A.foo() : number
|
||||
>A.foo() : boolean
|
||||
>A.foo : typeof foo
|
||||
>A.foo : () => boolean
|
||||
>A : typeof A
|
||||
>foo : typeof foo
|
||||
>foo : () => boolean
|
||||
|
||||
// multiple ~ operators
|
||||
var ResultIsNumber8 = ~~BOOLEAN;
|
||||
|
||||
@@ -17,10 +17,10 @@ class A {
|
||||
>a : number
|
||||
|
||||
static foo() { return 1; }
|
||||
>foo : typeof foo
|
||||
>foo : () => number
|
||||
}
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export var n: number;
|
||||
>n : number
|
||||
@@ -95,9 +95,9 @@ var ResultIsNumber10 = ~A.foo();
|
||||
>ResultIsNumber10 : number
|
||||
>~A.foo() : number
|
||||
>A.foo() : number
|
||||
>A.foo : typeof foo
|
||||
>A.foo : () => number
|
||||
>A : typeof A
|
||||
>foo : typeof foo
|
||||
>foo : () => number
|
||||
|
||||
var ResultIsNumber11 = ~(NUMBER + NUMBER);
|
||||
>ResultIsNumber11 : number
|
||||
|
||||
@@ -17,10 +17,10 @@ class A {
|
||||
>a : string
|
||||
|
||||
static foo() { return ""; }
|
||||
>foo : typeof foo
|
||||
>foo : () => string
|
||||
}
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export var n: string;
|
||||
>n : string
|
||||
@@ -95,9 +95,9 @@ var ResultIsNumber10 = ~A.foo();
|
||||
>ResultIsNumber10 : number
|
||||
>~A.foo() : number
|
||||
>A.foo() : string
|
||||
>A.foo : typeof foo
|
||||
>A.foo : () => string
|
||||
>A : typeof A
|
||||
>foo : typeof foo
|
||||
>foo : () => string
|
||||
|
||||
var ResultIsNumber11 = ~(STRING + STRING);
|
||||
>ResultIsNumber11 : number
|
||||
|
||||
@@ -110,23 +110,23 @@ interface A { // T
|
||||
a12: (x: Array<Base>, y: Array<Derived2>) => Array<Derived>;
|
||||
>a12 : (x: Base[], y: Derived2[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived2[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived2 : Derived2
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a13: (x: Array<Base>, y: Array<Derived>) => Array<Derived>;
|
||||
>a13 : (x: Base[], y: Derived[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a14: (x: { a: string; b: number }) => Object;
|
||||
@@ -332,23 +332,23 @@ interface I extends A {
|
||||
a12: <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>; // ok, less specific parameter type
|
||||
>a12 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a13: <T extends Array<Derived>>(x: Array<Base>, y: T) => T; // ok, T = Array<Derived>, satisfies constraint, contextual signature instantiation succeeds
|
||||
>a13 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
|
||||
@@ -111,23 +111,23 @@ interface A { // T
|
||||
a12: (x: Array<Base>, y: Array<Derived2>) => Array<Derived>;
|
||||
>a12 : (x: Base[], y: Derived2[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived2[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived2 : Derived2
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a13: (x: Array<Base>, y: Array<Derived>) => Array<Derived>;
|
||||
>a13 : (x: Base[], y: Derived[]) => Derived[]
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : Derived[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a14: (x: { a: string; b: number }) => Object;
|
||||
@@ -280,23 +280,23 @@ interface I extends B {
|
||||
a12: <T extends Array<Base>>(x: Array<Base>, y: T) => Array<Derived>; // ok, less specific parameter type
|
||||
>a12 : <T extends Base[]>(x: Base[], y: T) => Derived[]
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
|
||||
a13: <T extends Array<Derived>>(x: Array<Base>, y: T) => T; // ok, T = Array<Derived>, satisfies constraint, contextual signature instantiation succeeds
|
||||
>a13 : <T extends Derived[]>(x: Base[], y: T) => T
|
||||
>T : T
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Derived : Derived
|
||||
>x : Base[]
|
||||
>Array : T[]
|
||||
>Array : Array<T>
|
||||
>Base : Base
|
||||
>y : T
|
||||
>T : T
|
||||
|
||||
@@ -111,7 +111,7 @@ function foo8(x: number) {
|
||||
return { x: x };
|
||||
>{ x: x } : { x: number; }
|
||||
>x : number
|
||||
>x : x
|
||||
>x : number
|
||||
}
|
||||
var r8 = foo8(1);
|
||||
>r8 : { x: number; }
|
||||
@@ -163,7 +163,7 @@ var r10 = foo10(1);
|
||||
>foo10 : typeof foo10
|
||||
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export var x = 1;
|
||||
>x : number
|
||||
@@ -215,7 +215,7 @@ function m1() { return 1; }
|
||||
>m1 : typeof m1
|
||||
|
||||
module m1 { export var y = 2; }
|
||||
>m1 : typeof m1
|
||||
>m1 : m1
|
||||
>y : number
|
||||
|
||||
function foo13() {
|
||||
@@ -239,7 +239,7 @@ class c1 {
|
||||
>x : any
|
||||
}
|
||||
module c1 {
|
||||
>c1 : typeof c1
|
||||
>c1 : c1
|
||||
|
||||
export var x = 1;
|
||||
>x : number
|
||||
@@ -260,7 +260,7 @@ enum e1 { A }
|
||||
>A : e1
|
||||
|
||||
module e1 { export var y = 1; }
|
||||
>e1 : typeof e1
|
||||
>e1 : e1
|
||||
>y : number
|
||||
|
||||
function foo15() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
=== tests/cases/compiler/chainedImportAlias_file1.ts ===
|
||||
import x = require('chainedImportAlias_file1');
|
||||
>x : typeof "tests/cases/compiler/chainedImportAlias_file1"
|
||||
>x : x
|
||||
|
||||
import y = x;
|
||||
>y : typeof "tests/cases/compiler/chainedImportAlias_file1"
|
||||
>x : typeof "tests/cases/compiler/chainedImportAlias_file1"
|
||||
>y : y
|
||||
>x : typeof x
|
||||
|
||||
declare var console: {
|
||||
>console : { log(message?: any): any; }
|
||||
@@ -19,5 +19,5 @@ console.log(y);
|
||||
>console.log : (message?: any) => any
|
||||
>console : { log(message?: any): any; }
|
||||
>log : (message?: any) => any
|
||||
>y : typeof "tests/cases/compiler/chainedImportAlias_file1"
|
||||
>y : typeof x
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// expected no error
|
||||
|
||||
module B {
|
||||
>B : typeof B
|
||||
>B : a.b
|
||||
|
||||
export import a = A;
|
||||
>a : typeof A
|
||||
>A : typeof A
|
||||
>a : a
|
||||
>A : typeof a
|
||||
|
||||
export class D extends a.C {
|
||||
>D : D
|
||||
>a : a
|
||||
>C : C
|
||||
>C : a.C
|
||||
|
||||
id: number;
|
||||
>id : number
|
||||
@@ -19,15 +19,15 @@ module B {
|
||||
}
|
||||
|
||||
module A {
|
||||
>A : typeof A
|
||||
>A : b.a
|
||||
|
||||
export class C { name: string }
|
||||
>C : C
|
||||
>name : string
|
||||
|
||||
export import b = B;
|
||||
>b : typeof B
|
||||
>B : typeof B
|
||||
>b : b
|
||||
>B : typeof b
|
||||
}
|
||||
|
||||
var c: { name: string };
|
||||
@@ -36,12 +36,12 @@ var c: { name: string };
|
||||
|
||||
var c = new B.a.C();
|
||||
>c : { name: string; }
|
||||
>new B.a.C() : C
|
||||
>B.a.C : typeof C
|
||||
>new B.a.C() : A.C
|
||||
>B.a.C : typeof A.C
|
||||
>B.a : typeof A
|
||||
>B : typeof B
|
||||
>a : typeof A
|
||||
>C : typeof C
|
||||
>C : typeof A.C
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
=== tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export class N { }
|
||||
>N : N
|
||||
|
||||
export module N {
|
||||
>N : typeof N
|
||||
>N : N
|
||||
|
||||
export var v = 0;
|
||||
>v : number
|
||||
@@ -14,7 +14,7 @@ module M {
|
||||
}
|
||||
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export class O extends M.N {
|
||||
>O : O
|
||||
|
||||
@@ -9,7 +9,7 @@ class C {
|
||||
>thing : () => void
|
||||
|
||||
static other() { }
|
||||
>other : typeof other
|
||||
>other : () => void
|
||||
}
|
||||
|
||||
class D extends C {
|
||||
@@ -46,9 +46,9 @@ var r3 = d.thing();
|
||||
var r4 = D.other();
|
||||
>r4 : void
|
||||
>D.other() : void
|
||||
>D.other : typeof other
|
||||
>D.other : () => void
|
||||
>D : typeof D
|
||||
>other : typeof other
|
||||
>other : () => void
|
||||
|
||||
class C2<T> {
|
||||
>C2 : C2<T>
|
||||
@@ -64,7 +64,7 @@ class C2<T> {
|
||||
>T : T
|
||||
|
||||
static other<T>(x: T) { }
|
||||
>other : typeof other
|
||||
>other : <T>(x: T) => void
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
@@ -106,7 +106,7 @@ var r7 = d2.thing('');
|
||||
var r8 = D2.other(1);
|
||||
>r8 : void
|
||||
>D2.other(1) : void
|
||||
>D2.other : typeof other
|
||||
>D2.other : <T>(x: T) => void
|
||||
>D2 : typeof D2
|
||||
>other : typeof other
|
||||
>other : <T>(x: T) => void
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/classExtendingQualifiedName2.ts ===
|
||||
module M {
|
||||
>M : typeof M
|
||||
>M : M
|
||||
|
||||
export class C {
|
||||
>C : C
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user