5 lines
164 B
TypeScript
5 lines
164 B
TypeScript
//// [contextualTyping9.ts]
|
|
var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}];
|
|
|
|
//// [contextualTyping9.js]
|
|
var foo = [{ id: 1 }, { id: 2, name: "foo" }];
|