contextualTyping2.ts(1,32): error TS2353: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.


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