Element implicitly has an 'any' type because expression of type 'string' can't be used to index type “ClassName”?

前端 未结 0 460
轻奢々
轻奢々 2020-12-04 07:04
export class User {
    name: string;
    .
    .   
    constructor(attributes: any) {
        for(const key in attributes){
          if(this.hasOwnProperty(key)){         


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