Add test and accept baselines
This commit is contained in:
parent
80453021af
commit
ae559a7ccf
|
@ -0,0 +1,27 @@
|
|||
//// [extendConstructSignatureInInterface.ts]
|
||||
interface C {
|
||||
new(x: number): C;
|
||||
}
|
||||
|
||||
var CStatic: C;
|
||||
class E extends CStatic {
|
||||
}
|
||||
|
||||
var e: E = new E(1);
|
||||
|
||||
|
||||
//// [extendConstructSignatureInInterface.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var CStatic;
|
||||
var E = (function (_super) {
|
||||
__extends(E, _super);
|
||||
function E() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return E;
|
||||
})(CStatic);
|
||||
var e = new E(1);
|
|
@ -0,0 +1,23 @@
|
|||
=== tests/cases/compiler/extendConstructSignatureInInterface.ts ===
|
||||
interface C {
|
||||
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
|
||||
|
||||
new(x: number): C;
|
||||
>x : Symbol(x, Decl(extendConstructSignatureInInterface.ts, 1, 8))
|
||||
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
|
||||
}
|
||||
|
||||
var CStatic: C;
|
||||
>CStatic : Symbol(CStatic, Decl(extendConstructSignatureInInterface.ts, 4, 3))
|
||||
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
|
||||
|
||||
class E extends CStatic {
|
||||
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
|
||||
>CStatic : Symbol(CStatic, Decl(extendConstructSignatureInInterface.ts, 4, 3))
|
||||
}
|
||||
|
||||
var e: E = new E(1);
|
||||
>e : Symbol(e, Decl(extendConstructSignatureInInterface.ts, 8, 3))
|
||||
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
|
||||
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
=== tests/cases/compiler/extendConstructSignatureInInterface.ts ===
|
||||
interface C {
|
||||
>C : C
|
||||
|
||||
new(x: number): C;
|
||||
>x : number
|
||||
>C : C
|
||||
}
|
||||
|
||||
var CStatic: C;
|
||||
>CStatic : C
|
||||
>C : C
|
||||
|
||||
class E extends CStatic {
|
||||
>E : E
|
||||
>CStatic : C
|
||||
}
|
||||
|
||||
var e: E = new E(1);
|
||||
>e : E
|
||||
>E : E
|
||||
>new E(1) : E
|
||||
>E : typeof E
|
||||
>1 : number
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
interface C {
|
||||
new(x: number): C;
|
||||
}
|
||||
|
||||
var CStatic: C;
|
||||
class E extends CStatic {
|
||||
}
|
||||
|
||||
var e: E = new E(1);
|
Loading…
Reference in a new issue