Closed
Description
TypeScript Version: 2.7.0-dev.20180110
Code
export class Test {
private _foo: string;
constructor() {
this._init();
}
private _init() {
this._foo = 'test';
}
}
https://github.com/berickson1/Playground/blob/master/strictPropertyInitError.ts
Expected behavior:
Code compiles with strict flags on
Actual behavior:
strictPropertyInitError.ts(4,13): error TS2564: Property '_foo' has no initializer and is not definitely assigned in the constructor.