Skip to content

VSCode does not show some typescript isolatedModules errors #57833

Description

Type: Bug

Repro

  1. Checkout https://github.com/bradzacher/bug-repros/tree/vscode-typescript-isolatedModules:
    • git clone https://github.com/bradzacher/bug-repros.git
    • git fetch
    • git switch vscode-typescript-isolatedModules
  2. Open the folder in vscode
  3. Open terminal and install in folder npm i
  4. Open package1/index.ts
    • Observe there are no TS errors reported.
  5. Open terminal and build npm run build
    • Observe there is a TS build error reported:
> tsc -p ./package1/tsconfig.json
package1/index.ts:3:21 - error TS2748: Cannot access ambient const enums when 'isolatedModules' is enabled.
3 export const test = Foo.Bar;
~~~
Found 1 error in package1/index.ts:3

Expected:

VSCode shows the error when viewing package1/index.ts in the IDE

Actual:

VSCode shows no errors.


VS Code version: Code 1.87.2 (Universal) (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:21:31.043Z)
OS version: Darwin arm64 23.4.0
Modes:

System Info
ItemValue
CPUsApple M1 Max (10 x 24)
GPU Status2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg)2, 2, 3
Memory (System)64.00GB (20.85GB free)
Process Argv--crash-reporter-id 4f7fbb36-3a81-40a0-a922-a2a72f77abfa
Screen Readerno
VM0%
Extensions (49)
ExtensionAuthor (truncated)Version
vscode-ndjsonadr0.100.0
vscode-zipfsarc3.0.0
ast-grep-vscodeast0.1.3
vscode-bazelBaz0.9.0
soysyntaxcheckerBlo3.30.0
vscode-coloured-status-bar-problemsbra0.2.0
vscode-copy-filenamebra0.1.1
npm-intellisensechr1.4.5
path-intellisensechr2.8.5
vscode-css-modulescli0.5.1
coder-remotecod0.1.35
vscode-clockCom0.0.1
vscode-markdownlintDav0.54.0
vscode-eslintdba2.4.4
make-hiddendev4.0.4
dprintdpr0.16.0
gitlenseam14.9.0
EditorConfigEdi0.16.4
prettier-vscodeesb10.1.0
vscode-github-actionsgit0.26.2
vscode-pull-request-githubGit0.82.0
vscode-graphqlGra0.9.3
vscode-graphql-syntaxGra1.3.5
nix-idejno0.3.1
statusbarerrorJoe0.4.0
vscode-json5mrm1.0.0
remote-sshms-0.109.0
remote-ssh-editms-0.86.0
hexeditorms-1.9.14
remote-explorerms-0.4.3
vscode-js-profile-flamems-1.0.8
vslivesharems-1.0.5918
vscode-paste-imagemus1.0.4
inline-sql-syntaxquf2.16.0
rust-analyzerrus0.3.1877
bazel-stack-vscodeSta1.9.8
rewrapstk1.16.3
code-spell-checkerstr3.0.1
vscode-stylelintsty1.3.0
even-better-tomltam0.19.2
shellchecktim0.37.0
jest-snapshot-language-supporttle1.1.1
pdftom1.2.2
vscode-mdxuni1.8.2
vscode-lldbvad1.10.0
es-quotesvil0.2.6
vscode-iconsvsc12.7.0
vscode-wakatimeWak24.4.0
vscode-proto3zxh0.5.5
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:30979542
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r6:30958158
dsvsc020:30976470

Metadata

Metadata

Labels

Fix AvailableA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions