我正在尝试获取类的实例方法的类型。除了在类的原型中查找类型之外,还有其他内置(更好)的方法吗?
class MyClass
{
private delegate: typeof MyClass.prototype.myMethod; // gets the type ( boolean ) => number;
public myMethod( arg: boolean )
{
return 3.14;
}
}
Run Code Online (Sandbox Code Playgroud)
提前致谢!
typescript ×1