简体   繁体   English

如何将我的自定义npm软件包添加到TypeScript定义管理器?

[英]How can i add my custom npm package to TypeScript Definition manager?

i have created couple of custom npm modules with javascript . 我用javascript创建了几个自定义npm模块。 Not so long ago i started to experiment with typescript . 不久前,我开始尝试typescript So there is my question. 所以这是我的问题。 How can i add my packages to TypeScript Definition manager ? 如何将软件包添加到TypeScript Definition manager Or maybe i should rewrite them into typescript and then what ? 或者,也许我应该将它们重写为typescript ,然后呢?

TypeScript Definition manager TypeScript定义管理器

In my project i am using webpack , maybe i should not create any definition and maybe you know some GOOD way of using my modules with typescript ? 在我的项目中,我使用的是webpack ,也许我不应该创建任何定义,也许您知道使用带有typescript的模块的某些方法吗?

tsd has now given way to typings . tsd现在已经让路给typings The procedure to adding your typings is given here: https://github.com/typings/registry 在此处提供添加类型的过程: https : //github.com/typings/registry

I'd avoid rewriting to TypeScript - while that would make managing them in the future much easier, it might just do for you to have your own declare s stacked up into a Typings file, which would be significantly easier 我想避免重写,以打字稿-而这会在将来管理它们更加容易,它可能只是为你做的有自己的declare小号堆积成一个分型文件,这将是显著更容易

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM