typescript 配置: is module setting case sensitive?

标签 typescript module extends tsconfig compiler-options

我有一个来自以下两个 tsconfig.json 文件的问题,它们位于同一个项目中,一个扩展了另一个:

父级

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "module": "ESNext"
    }
    // ...

子级

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "module": "esNext",
   },
   
   // ...

}

不清楚:

  1. 模块参数区分大小写吗?
  2. 像这样的设置,子配置扩展了父配置,模块类型相同,但大小写不同。这会以某种方式影响输出,给出不同的结果吗? (我想说,如果模块相等,则应该仅在父级中定义)。

可用信息

来自another answer :

In order to make code portable, it's important to make sure the casing in a module specifier matches the referenced file name exactly.

当我说“使代码可移植”时,我不确定OP指的是什么,对此有任何澄清吗?

谢谢

最佳答案

它似乎不区分大小写,因为我尝试了“esnext”和“ESnext”并得到了相同的输出。

关于 typescript 配置: is module setting case sensitive?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62943333/

相关文章:

Android studio 无法解析 mapActivity

c# - Extended Controller 构造函数没有 User 的实例

javascript - Angular4 View 不更新 setTimeout 中的数据集

javascript - 编译后的 typescript 和 vanilla javascript 之间的内存使用情况不同

reactjs - 我应该如何在 React 中使用 Typescript 声明无状态功能组件?

javascript - 如何使 javascript 库在 Node js 中工作以进行服务器端操作

java - 使用泛型参数类型重载构造函数(扩展与扩展和接口(interface))

javascript - 每个 JavaScript 程序都是 TypeScript 程序吗?

ruby - 模块中的动态方法?

java - 不能使用来自不同 Maven 模块的类