Typescript error runtime error: Cannot read property 'prototype' of undefined when extending

后端 未结 5 686
你的背包
你的背包 2021-01-01 09:31

So I\'m getting the above error in the console. It\'s caused by _super being undefined when it\'s passed to __extends (in the generated .js

5条回答
  •  自闭症患者
    2021-01-01 09:47

    Just leaving here how I solved this issue for my case : I missed a reference at the top of the TS file and it was totally ok for the build, whereas I had the same error on runtime. Adding the reference that seemed to be optional solved my runtime issue.

提交回复
热议问题