class PNode {
static of: (<T extends typeof PNode>(this:T, attr:Partial<InstanceType<T>>, ...children:PNode[])=> InstanceType<T> ) = (()=>{
} ) as any
}
class PNode {
static of: (<T extends typeof PNode>(this:T, attr:Partial<InstanceType<T>>, ...children:PNode[])=> InstanceType<T> ) = (()=>{
} ) as any
}
本文标题:typescript 在静态函数上使用this类型
本文链接:https://www.haomeiwen.com/subject/ajdizltx.html
网友评论