Files

8 lines
411 B
Plaintext

contextualTyping5.ts(1,20): error TS2741: Property 'id' is missing in type '{}' but required in type '{ id: number; }'.
==== contextualTyping5.ts (1 errors) ====
class foo { public bar:{id:number;} = { }; }
~~~
!!! error TS2741: Property 'id' is missing in type '{}' but required in type '{ id: number; }'.
!!! related TS2728 contextualTyping5.ts:1:25: 'id' is declared here.