- Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
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.
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed