Closed
Description
TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)
Code
abstract class A {
public abstract names:string;
public constructor() {
console.log(this.names);
}
public speak() {
console.log(this.names);
}
}
class B extends A {
public names:string= "scott";
}
new B().speak();
Expected behavior:
Output to be
scott
scott
Actual behavior:
undefined
scott