TypeScript/tests/baselines/reference/contextualTyping10.js

11 lines
246 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [contextualTyping10.ts]
class foo { public bar:{id:number;}[] = [{id:1}, {id:2}]; }
//// [contextualTyping10.js]
var foo = (function () {
function foo() {
this.bar = [{ id: 1 }, { id: 2 }];
2014-07-13 01:04:16 +02:00
}
return foo;
})();