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

后端 未结 12 1261
清歌不尽
清歌不尽 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:40

    at first, make sure that use

    ///    
    

    to refrence code to another .ts file at typescript root file

    to compile typescript files that exist in different file.ts use this command

    tsc --out app.js app.ts

    because this command converts all typescript files into app.js

提交回复
热议问题