Typescript error TS1005: ';' expected

前端 未结 3 2391
眼角桃花
眼角桃花 2021-02-20 03:21

I am trying compile this typescript file:

import http = module(\"http\");
import express = module(\"express\");

With these parameters:

相关标签:
3条回答
  • 2021-02-20 03:48

    Typescript compiler (https://www.npmjs.org/package/typescript-compiler) commands.

    I use --allowimportmodule

    0 讨论(0)
  • 2021-02-20 04:02

    The syntax in 0.9.1 is now import mod = require('modname');

    0 讨论(0)
  • 2021-02-20 04:05

    I was getting these errors with a .Net Core application in Visual Studio Professional 2019, I got the 16.4.4 update and applied that which in turn had a requirement to reboot the computer which of course closed and then re-opened the solution. After this, the various TS errors went away.

    0 讨论(0)
提交回复
热议问题