typescript - tsc 和嵌套的 tsconfigs
问题描述
TS 3.5 我有以下配置在开发过程中与 tsserver 一起工作正常:
/tsconfig.json <= "strict": true
/nested/tsconfig.json <= extends parent tsconfig, "noImplicitThis": false
/nested/some ts code <= has implicit this
所以我的父配置定义了严格的 true,并且项目中的大多数代码都符合这个规则。但是在名为的文件夹nested
中有一个不符合 whit 的代码noImplicitThis
,所以我在那里添加了tsconfig.json
那个extends
父级tsconfig
并将 compilerOptionnoImplicitThis
设置为false
.
而且我在使用vscode
.
但是当我尝试做tsc -p .
(在根目录中)时,我在nested
文件夹代码中得到“隐式这个”的错误。
所以我不知道如何在nested/**
使用tsc
.
解决方案
推荐阅读
- reactjs - 使用 react-router-dom 时延迟加载不起作用
- javascript - 在其他脚本完成更改 dom 时运行脚本
- node.js - 将大文件从 Google Cloud Function 上传到 Google Cloud Storage 失败
- javascript - Laravel-mix@6.0.10 出现未知错误 Uncaught DOMException: Failed to construction 'WebSocket'
- android - Flutter InAppWebView 摄像头/音频权限
- reactjs - 无法在 useEffect 挂钩中使用反应表单数据
- reactjs - Vue 2 TSX -> React TSX .. 如何让它们玩得更好
- sql - 你能在 DENSE_RANK() OVER PARTITION 中得到两个相同的 order_position(或行号)吗?
- python - TensorFlow 在使用 GPU 时抛出异常
- python - 使用 python 的 Elasticsearch 包连接到远程 Elasticsearch 服务器