如何使用节点断言模块与打字稿?

时间:2015-11-27 23:01:37

标签: node.js typescript

我无法获取打字稿来编译这个单行文件:

import assert = require("assert");

这是我试过的命令:

$ tsc --module commonjs --moduleResolution node index.ts 

如何导入asserthttp或节点附带的任何内容?

修改:错误消息

index.ts(1,25): error TS2307: Cannot find module 'assert'.

0 个答案:

没有答案