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

后端 未结 5 693
你的背包
你的背包 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条回答
  •  Happy的楠姐
    2021-01-01 09:36

    Possible reasons this is happening:

    1. Quadruple-check that BundleConfig is concatenating the files in the correct order. This is by far the most common cause of that error.
    2. Verify you don't have any top-level export directives in Test.ts. This would cause the file to become an external module and Test1 would no longer be visible.

    Failing that, you should post the emitted JavaScript to the question so we can diagnose what's causing the issue.

提交回复
热议问题