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

后端 未结 8 1664
醉话见心
醉话见心 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:46

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

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

提交回复
热议问题