ts 修改readonly参数

  readonly name = "xxx";

  updateValueAndValidity(): void {
    // this.name = 'a';
    (this as { name: string }).name = "a";
  }
原文地址:https://www.cnblogs.com/ajanuw/p/12067584.html