You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Checker: direct reads of later class fields omit TS2729 #3581
The checker accepts a direct class field read before the referenced field is initialized.
classC{z=this.y;y=1;}
Pinned TypeScript 6.0.3 with --ignoreConfig --strict --noEmit reports TS2729 at this.y (Property 'y' is used before its initialization). SharpTS exits successfully with --no-tsconfig --strict --noEmit on frozen cabb41636 (CLI SHA-256 5335B14C2A96172D0372D8FCDD75264741EB8A0B19C0273737C3BBF2967D3ACE) and PR #3577 head cc5f1af6b.
A read deferred until after construction, such as z = () => this.y, should remain valid. #3554 concerns recovering the type of a field that depends on a cyclic getter. This source has no getter, cycle, closure, inheritance, or constructor body. Found while comparing #3577's automated review example against TypeScript.
Activity