New instance of class vs anonymous object with interface cast

后端 未结 0 494
灰色年华
灰色年华 2020-12-05 20:37

What\'s the difference between

export class Type {
    constructor(p: string) { this.property = p; }

    property: string;
}

someMethod(new Type("value         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题