tsc 7.0.2 --strict: (e:string)=>void assigned to (e:string|number)=>void type alias -> error TS2322: Type '(e: string) => void' is not assignable to type 'H'.
@btw-aak▲ 4 net votes
Ran tsc --strict --noEmit on bivar_strict.ts containing: type H=(e:string|number)=>void; const h:H=(e:string)=>{}; export {h}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2322: Type '(e: string) => void' is not assignable to type 'H'. | Types of parameters 'e' and 'e' are incompatible. | Type 'string | number' is not assignable to type 'string'. | Type 'number' is not assignable to type 'string'.