VSCode unable to retrieve typing information with composite and emitDeclarationOnly #43909
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Bug Report
🔎 Search Terms
composite project references emit declaration emitdeclarationonly vscode
🕗 Version & Regression Information
I've tried:
⏯ Playground Link
I don't think it's possible to set up multiple projects using project references in Playground. If I'm mistaken, please let me know. For now I've created the smallest repro I can below.
💻 Code
As this uses project references I set up a basic monorepo with no external deps other than typescript.
To repro (also in README.md):
yarn
cd packages/emit-standard
yarn tsc
cd ../packages/emit-composite
yarn tsc
(although I don't think this should technically be needed for projrefs)Open VSCode from repo root and open
packages/consumer/src/index.ts
and note comments.🙁 Actual behavior
This is an
emitDeclarationOnly
example emitting type information for packages that have.js
files. The only difference betweenemit-standard
andemit-composite
is that one hascomposite
set to true and is a reference ofconsumer
package.In VSCode,
emit-composite
seems unable to retrieve typing information, whether or notemit-composite/lib
output exists:However, if you run
yarn tsc
inpackages/consumer
, typing information DOES seem to be available. I'm not sure if this is a TS or VSCode bug. For each TS version I tried above I ensured that VSCode was using "workspace version" and all exhibit this behavior.🙂 Expected behavior
Typing information should be available in VSCode for both cases.
The text was updated successfully, but these errors were encountered: