microsoft / microsoft/TypeScript
Module value in TSConfig does not enforce ModuleResolution value
@andrewbranch đang làm issue này rồi.
Từ ngày 27/7/2026.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
### 🔎 Search Terms
moduleresolution enforce
### 🕗 Version & Regression Information
I tested also on typescript 5 and the behavior was the same
### ⏯ Playground Link
_No response_
### 💻 Code
According to docs certain `module` values imply and _**enforce**_ certain `moduleResolution` values as decribed at https://www.typescriptlang.org/docs/handbook/modules/reference.html#implied-and-enforced-options
However the following `tsconfig` works without any issue:
```json
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "node16", // this should not be allowed
"outDir": "dist",
"rootDir": ".",
"sourceMap": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["*"]
}
}
```
even when according to docs `--module nodenext` should enforce `--moduleResolution nodenext`
### 🙁 Actual behavior
the `tsc` compilation works with option that should fail according to docs
### 🙂 Expected behavior
fix the behavior or the docs
### Additional information about the issue
typescript version: 6.0.3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.