Property 'assign' does not exist on type 'ObjectConstructor'

后端 未结 8 1593
醉话见心
醉话见心 2020-12-02 14:47

I am using TypeScript in my application, where I use function:

Object.assign(this.success, success.json())

However, during compilation, I r

相关标签:
8条回答
  • 2020-12-02 15:43

    I've added typings:

    typings install dt~es6-shim --global --save
    
    0 讨论(0)
  • 2020-12-02 15:46

    I know this has been long but here is an easy fix

    (Object as any).assign(this.success, success.json())
    
    0 讨论(0)
提交回复
热议问题