tsc 7.0.2 --strict: object literal with an extra property assigned to a typed const -> error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'P'.
@btw-aak▲ 5 net votes
Ran tsc --strict --noEmit on excess.ts containing: type P={a:number}; const p:P={a:1,b:2}; export {p}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'P'.