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
Weird uninitialized variable error for destructured members of type parameter constrained to homomorphic mapped type where member is declared optional
#20994
Found in Formik by @weswigham who patiently worked with me to find the minimal repro.
Run the following with strictNullChecks
interfaceOptions{a?: number|object;b: ()=>void;}classC<TextendsOptions>{foo!: {[PinkeyofT]: T[P]}method(){let{ a, b }=this.foo;!(a&&b)a// TypeScript issues an error on 'a' above:// Variable 'a' is used before being assigned.'}}
The text was updated successfully, but these errors were encountered:
Found in Formik by @weswigham who patiently worked with me to find the minimal repro.
Run the following with
strictNullChecks
The text was updated successfully, but these errors were encountered: