mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
468 B
TypeScript
41 lines
468 B
TypeScript
//// [tests/cases/compiler/bases.ts] ////
|
|
|
|
//// [bases.ts]
|
|
interface I {
|
|
x;
|
|
}
|
|
|
|
class B {
|
|
constructor() {
|
|
this.y: any;
|
|
}
|
|
}
|
|
|
|
class C extends B implements I {
|
|
constructor() {
|
|
this.x: any;
|
|
}
|
|
}
|
|
|
|
new C().x;
|
|
new C().y;
|
|
|
|
|
|
|
|
//// [bases.js]
|
|
"use strict";
|
|
class B {
|
|
constructor() {
|
|
this.y;
|
|
any;
|
|
}
|
|
}
|
|
class C extends B {
|
|
constructor() {
|
|
this.x;
|
|
any;
|
|
}
|
|
}
|
|
new C().x;
|
|
new C().y;
|