8000 Add test and accept baselines · DINKIN/TypeScript@ae559a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae559a7

Browse files
committed
Add test and accept baselines
1 parent 8045302 commit ae559a7

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//// [extendConstructSignatureInInterface.ts]
2+
interface C {
3+
new(x: number): C;
4+
}
5+
6+
var CStatic: C;
7+
class E extends CStatic {
8+
}
9+
10+
var e: E = new E(1);
11+
12+
13+
//// [extendConstructSignatureInInterface.js]
14+
var __extends = (this && this.__extends) || function (d, b) {
15+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
16+
function __() { this.constructor = d; }
17+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18+
};
19+
var CStatic;
20+
var E = (function (_super) {
21+
__extends(E, _super);
22+
function E() {
23+
_super.apply(this, arguments);
24+
}
25+
return E;
26+
})(CStatic);
27+
var e = new E(1);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
=== tests/cases/compiler/extendConstructSignatureInInterface.ts ===
2+
interface C {
3+
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
4+
5+
new(x: number): C;
6+
>x : Symbol(x, Decl(extendConstructSignatureInInterface.ts, 1, 8))
7+
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
8+
}
9+
10+
var CStatic: C;
11+
>CStatic : Symbol(CStatic, Decl(extendConstructSignatureInInterface.ts, 4, 3))
12+
>C : Symbol(C, Decl(extendConstructSignatureInInterface.ts, 0, 0))
13+
14+
class E extends CStatic {
15+
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
16+
>CStatic : Symbol(CStatic, Decl(extendConstructSignatureInInterface.ts, 4, 3))
17+
}
18+
19+
var e: E = new E(1);
20+
>e : Symbol(e, Decl(extendConstructSignatureInInterface.ts, 8, 3))
21+
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
22+
>E : Symbol(E, Decl(extendConstructSignatureInInterface.ts, 4, 15))
23+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
=== tests/cases/compiler/extendConstructSignatureInInterface.ts ===
2+
interface C {
3+
>C : C
4+
5+
new(x: number): C;
6+
>x : number
7+
>C : C
8+
}
9+
10+
var CStatic: C;
11+
>CStatic : C
12+
>C : C
13+
14+
class E extends CStatic {
15+
>E : E
16+
>CStatic : C
17+
}
18+
19+
var e: E = new E(1);
20+
>e : E
21+
>E : E
22+
>new E(1) : E
23+
>E : typeof E
24+
>1 : number
25+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
interface C {
2+
new(x: number): C;
3+
}
4+
5+
var CStatic: C;
6+
class E extends CStatic {
7+
}
8+
9+
var e: E = new E(1);

0 commit comments

Comments
 (0)
0