10 lines
244 B
TypeScript
10 lines
244 B
TypeScript
//// [contextualTyping4.ts]
|
|
class foo { public bar:{id:number;} = {id:5, name:"foo"}; }
|
|
|
|
//// [contextualTyping4.js]
|
|
var foo = (function () {
|
|
function foo() {
|
|
this.bar = { id: 5, name: "foo" };
|
|
}
|
|
return foo;
|
|
})();
|