[英]How to Declare an array in a node module and another JavaScript file (Mongodb)
[英]How to declare a module with simple one-file project
我试图像这样导入我的库:
import jsonStdio = require('json-stdio');
有问题的库在这里: https : //github.com/ORESoftware/json-stdio/blob/master/index.ts
有谁知道我如何正确创建一个模块,以便可以使用import x = require('x')
语法和TS import x = require('x')
该模块?
啊,我要做的就是为json-stdio
项目添加package.json
文件:
"typings": "index.d.ts",
"types": "index.d.ts",
如果有更好/不同的方法,请让我知道,但是因为我错过了其中一行(我总是将两者都添加,仅是因为),所以它无法识别我的.d.ts / declaration
文件在我的json-stdio
项目中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.