Add test case

This commit is contained in:
Nathan Shively-Sanders
2015-10-08 16:36:15 -07:00
parent 0d95d0405c
commit ff43d464fc
4 changed files with 60 additions and 0 deletions

View File

@@ -1,6 +1,19 @@
//// [ambientClassDeclarationWithExtends.ts]
declare class A { }
declare class B extends A { }
declare class C {
public foo;
}
namespace D { var x; }
declare class D extends C { }
var d: C = new D();
//// [ambientClassDeclarationWithExtends.js]
var D;
(function (D) {
var x;
})(D || (D = {}));
var d = new D();

View File

@@ -6,3 +6,22 @@ declare class B extends A { }
>B : Symbol(B, Decl(ambientClassDeclarationWithExtends.ts, 0, 19))
>A : Symbol(A, Decl(ambientClassDeclarationWithExtends.ts, 0, 0))
declare class C {
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
public foo;
>foo : Symbol(foo, Decl(ambientClassDeclarationWithExtends.ts, 3, 17))
}
namespace D { var x; }
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))
>x : Symbol(x, Decl(ambientClassDeclarationWithExtends.ts, 6, 17))
declare class D extends C { }
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
var d: C = new D();
>d : Symbol(d, Decl(ambientClassDeclarationWithExtends.ts, 9, 3))
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))

View File

@@ -6,3 +6,23 @@ declare class B extends A { }
>B : B
>A : A
declare class C {
>C : C
public foo;
>foo : any
}
namespace D { var x; }
>D : typeof D
>x : any
declare class D extends C { }
>D : D
>C : C
var d: C = new D();
>d : C
>C : C
>new D() : D
>D : typeof D

View File

@@ -1,2 +1,10 @@
declare class A { }
declare class B extends A { }
declare class C {
public foo;
}
namespace D { var x; }
declare class D extends C { }
var d: C = new D();