Found in Formik by Wesley Wigham (@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.'}}
Found in Formik by Wesley Wigham (@weswigham) who patiently worked with me to find the minimal repro.
Run the following with
strictNullChecks