2015-02-11 36 views

回答

1

例如:

var tmp: any = function(newValue = 'Hello!') { 
    return newValue; 
} 
tmp.state = 123; 
var foo: IFoo<string> = tmp; 

console.log(foo.state); 
console.log(foo());