Using TypeScript, and Object.assign gives me an error “property 'assign' does not exist on type 'ObjectConstructor'”

后端 未结 3 1294
情深已故
情深已故 2020-12-29 01:22

I am writing my question again because earlier it made little sense and I wasn\'t very clear.

I am receiving data from API that looks something like this:

         


        
3条回答
  •  生来不讨喜
    2020-12-29 01:59

    For typescript version 2.0 or higher, just modify the tsconfig.json file so the "lib" section includes "es6":

    "lib": [
      "es5",
      "es6",
      "dom",
      "es2015.collection"
    ]
    

提交回复
热议问题