#64492·TypeScript

External directory from tsconfig `files` gets no watcher in LSP

Author: auvredCreated Sep 28, 2026Updated Sep 28, 2026

Search Terms

lsp, tsconfig, files, watch, directory

Version & Regression Information

Checked on latest commit on main

⏯ Playground Link

No response

Code

  1. Create projects
bash
mkdir ~/repro /tmp/a /Users/Shared/b
echo 'export {}' > ~/repro/index.ts
echo 'export {}' > /tmp/a/x.ts
echo '{"files": ["./index.ts", "/home/nobody/src/x.ts", "/tmp/a/x.ts", "/Users/Shared/b/y.ts"]}' > ~/repro/tsconfig.json
  1. Open index.ts in VS Code
  2. Check output of TypeScript 7

Actual behavior

2026-09-28 12:30:08.073 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.0
2026-09-28 12:30:08.073 [info] 	/Users/auvred/repro/**/*
2026-09-28 12:30:08.073 [info] 
2026-09-28 12:30:08.073 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.1
2026-09-28 12:30:08.074 [info] 	/home/nobody/src/**/*
2026-09-28 12:30:08.074 [info] 
2026-09-28 12:30:08.074 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.2
2026-09-28 12:30:08.074 [info] 	/tmp/a/**/*
2026-09-28 12:30:08.074 [info] 
2026-09-28 12:30:08.074 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.3
2026-09-28 12:30:08.074 [info] 	/tmp/a/b/**/*
2026-09-28 12:30:08.075 [info] 
2026-09-28 12:30:08.075 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.0
2026-09-28 12:30:08.075 [info] 	/users/auvred/dev/github/typescript/built/local/**/*
2026-09-28 12:30:08.075 [info] 
2026-09-28 12:30:08.075 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.1
2026-09-28 12:30:08.076 [info] 	/users/auvred/repro/**/*
2026-09-28 12:30:08.076 [info] 
2026-09-28 12:30:08.076 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.2
2026-09-28 12:30:08.076 [info] 	file:///home/nobody/src/**/*
2026-09-28 12:30:08.076 [info] 
2026-09-28 12:30:08.077 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.3
2026-09-28 12:30:08.077 [info] 	file:///users/**/*

Note that there is /tmp/a/b/**/* watcher (there is no such dir at all) and there is no /Users/Shared/b/**/* watcher

Expected behavior

2026-09-28 12:32:29.085 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.0
2026-09-28 12:32:29.085 [info] 	/Users/Shared/b/**/*
2026-09-28 12:32:29.085 [info] 
2026-09-28 12:32:29.086 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.1
2026-09-28 12:32:29.086 [info] 	/Users/auvred/repro/**/*
2026-09-28 12:32:29.086 [info] 
2026-09-28 12:32:29.087 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.2
2026-09-28 12:32:29.087 [info] 	/home/nobody/src/**/*
2026-09-28 12:32:29.087 [info] 
2026-09-28 12:32:29.088 [info] Added new watch: root files for /Users/auvred/repro/tsconfig.json watcher 9.3
2026-09-28 12:32:29.088 [info] 	/tmp/a/**/*
2026-09-28 12:32:29.089 [info] 
2026-09-28 12:32:29.091 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.0
2026-09-28 12:32:29.091 [info] 	/users/auvred/dev/github/typescript/built/local/**/*
2026-09-28 12:32:29.091 [info] 
2026-09-28 12:32:29.091 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.1
2026-09-28 12:32:29.091 [info] 	/users/auvred/repro/**/*
2026-09-28 12:32:29.091 [info] 
2026-09-28 12:32:29.092 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.2
2026-09-28 12:32:29.092 [info] 	file:///home/nobody/src/**/*
2026-09-28 12:32:29.092 [info] 
2026-09-28 12:32:29.094 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.3
2026-09-28 12:32:29.094 [info] 	file:///tmp/**/*
2026-09-28 12:32:29.094 [info] 
2026-09-28 12:32:29.095 [info] Added new watch: program files for /users/auvred/repro/tsconfig.json watcher 10.4
2026-09-28 12:32:29.095 [info] 	file:///users/**/*

Additional information about the issue

No response