interface ClockInterface {
    new (hour: number, minute: number): ClockInterface;
}

class MyArray1 <M>{
    val: M;
    set(num: M){
        this.val = num;
    }
    get(){
       return this.val;
    }
}

var num = 1234;
var arr = '2222';

let a1 = new MyArray1<number>();
a1.set(num);

let a2 = new MyArray1<string>();
a2.set(arr);

let aa = a1.get();
aa.toFixed(2)
a2.get().toLocaleUpperCase();

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2021-08-14
  • 2021-06-26
  • 2021-10-11
  • 2021-11-06
  • 2021-07-22
猜你喜欢
  • 2021-04-28
  • 2021-12-17
  • 2022-03-08
  • 2022-12-23
  • 2021-08-01
相关资源
相似解决方案