Importing node-modules with TypeScript

后端 未结 3 1452
南方客
南方客 2020-11-29 11:10

I\'m trying to get this to work, but I can\'t seem to find a solution anywhere on SO. When trying to compile this single-file app:

import http = require(\'ht         


        
3条回答
  •  执念已碎
    2020-11-29 11:39

    Shouldn't it be something like

    /// 
    import http = module('http')
    

    I mean, shouldn't you use module instead of require ?

提交回复
热议问题