javascript - Disable @types/node in tsconfig
问题描述
Given my codebase needs to contain nodejs and browser code and therefore @types/node
is installed inside node_modules
.
The frontend code contains setTimeout
calls - which would always return a number
for the browser.
Unfortunately @types/node
provides different typings and therefore it always shows the following type error:
TS2345: Argument of type 'Timeout' is not assignable to parameter of type 'number'.
Is there any way to exclude or disable @types/node
in my tsconfig.json
?
解决方案
不是在 package.json 文件中吗?
Obs:此文件位于项目文件夹的根目录中。
推荐阅读
- python - 如何将整个 python 应用程序添加到 azure databricks 中并运行它?
- database - 数据库崩溃后无法重新启动 mariadb 列存储
- javascript - 如何从内部组件导航到外部组件 react-router-dom?
- c - 分段错误,大小为 4 的无效写入
- java - 如何将 JAAS 登录模块添加到 Artemis?
- linux - google-appengine appcfg.py 下载源文件给出了无法创建目录
- ios - UISearchController 聚焦时动画损坏
- mysql - 我需要从 3 个分类法(个人资料类别、县、部门)中获取帖子数据
- sql-server - SQL 服务器 - 在 where 子句中使用 Avg() 函数
- batch-file - 批处理脚本将文本添加到文件中