Problems of Object.defineProperty in typescript

clipboard.png
the above code will report an error in ts

[ts]
"{ enumerable: true; configurable: true; set: Function; get(): any; }" "PropertyDescriptor & ThisType<any>" 
  "{ enumerable: true; configurable: true; set: Function; get(): any; }" "PropertyDescriptor" 
    "set" 
      "Function" "(v: any) => void" 
        "Function" "(v: any): void" 

ask God to tell me how to solve the problem.

Mar.28,2021

I do not report errors here, for example, the following code

function fn() {
  console.log("test");
}
function a() {
  console.log("test");
}

Object.defineProperty({}, "test", {
  enumerable: true,
  configurable: true,
  set: a || fn,
  get() {
    return 5;
  }
});

if the value on set is not a function, an error will be reported.
you can release this.option.set and noop to see his type

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d8d9-2c397.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d8d9-2c397.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?