Why Does This Typescript Output “[Class] is not a constructor.”?

后端 未结 12 1377
清歌不尽
清歌不尽 2021-01-17 07:55

I\'m working in typescript 1.5 in visual studio. I have a main class called app.ts, and another called FizzBuzzManager.ts. I can\'t figure out what is wrong with this code,

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 08:32

    TypeError: jim.FizzBuzzManager is not a constructor

    This is a common error when you use --out : https://basarat.gitbook.io/typescript/main-1/outfile

    You are responsible for loading the files in the right order. Don't use out and use external modules

提交回复
热议问题