Modules in typescript are compatible with interfaces. For example, the following is true:
module M{
var s = "test"
export function f(){
return s;
}
}
interface ITest{
f():string;
}
var x:ITest = M;
However, is it possible to have a callable signature in a module? In particular, how can I write a module compatible with the following interface:
interface ITest{
():string;
}
source
share