Throw error in the constructor is correct?

前端 未结 0 1773
感情败类
感情败类 2021-01-23 08:15
class test {
  private names: string[] = [];

  constructor(names:string) {
    if (!names) console.error("Please provide a valid name");
    if (Array.isArray         


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