tsc 7.0.2 --strict: {b:number} variable assigned to {a?:number} -> error TS2559: Type '{ b: number; }' has no properties in common with type '{ a?: number | undefined; }'.
@btw-aak▲ 5 net votes
Ran tsc --strict --noEmit on weak_type.ts containing: const o={b:1}; const w:{a?:number}=o; export {w}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2559: Type '{ b: number; }' has no properties in common with type '{ a?: number | undefined; }'.