如何在 Typescript 中启用 NodeJS 和 ExpressJs [英] How can you enable NodeJS and ExpressJs into Typescript

查看:45
本文介绍了如何在 Typescript 中启用 NodeJS 和 ExpressJs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在打字稿中为 Node 和 Express 找到一个 .d.ts 文件,它可以启用 Intellisense.到目前为止,我已经尝试使用此处提供的 Node.d.ts 文件:

I'm hoping to find a .d.ts file for both Node and Express, which would enable Intellisense, in typescript. So far, I've tried using a Node.d.ts file provided here:

https://github.com/borisyankov/DefinitelyTyped/tree/master/node

但是启用这个文件会在 Webstorm 中引发很多找不到文件"错误,对于像crypto"、net"和stream"这样的文件,我不知道在哪里可以找到这些.他们似乎在 Github 上不可用.

But enabliing this file throws a lot of "file not found" errors in Webstorm, for files like "crypto" "net" and "stream" I'm not sure where to find these. They don't seem to be available on Github.

--编辑--

错误以某种方式自行改变,现在我看到函数write"和listen"的错误.所以farmy程序可以运行,但是出现错误很麻烦.

Errors have somehow changed on their own and now I'm seeing errors for functions "write" and "listen". So farmy program runs, but its troublesome to have the errors.

我在 webstorm 中编码.

I'm coding in webstorm.

推荐答案

看看TEAN项目,结合Typescript+ExpressJS+Angular+NodeJS

Have a look at the TEAN project, combining Typescript+ExpressJS+Angular+NodeJS

https://github.com/urigoren/TEAN/

这篇关于如何在 Typescript 中启用 NodeJS 和 ExpressJs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆