【发布时间】:2014-05-25 17:34:26
【问题描述】:
代码如下:
interface Foo
{
c : string
}
function foo()
{
var c = this.c
return c
}
foo.call({ c : "quux" })
Visual Studio 说 this : any 所以自动补全 this.c 不起作用。如何添加签名以告知 this 实现 Foo 以便 IDE 在 foo 内具有自动完成 this. 的类型信息?
【问题讨论】:
标签: types typescript method-signature