Files

7 lines
435 B
Plaintext

contextualTyping17.ts(1,47): error TS2353: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
==== contextualTyping17.ts (1 errors) ====
var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"};
~~~~
!!! error TS2353: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.