project-references-demo
project-references-demo copied to clipboard
Is there anyway to get the auto import feature from VS Code to work with project reference?
Currently, it looks like the auto-import will work for any files are already referenced, so if i add a bark function to dog.ts, you can immediately import that in zoo.ts
However, let's say I add a new file, cat.ts, and a meow function in it. There's no way to auto-import that function into zoo.ts.
I tried this with tsc -b -w running and the declarations are being created, but VS code still doesn't pick that up
I've been puzzling over this for a few days. Should we expect to be able to auto-import from referenced projects? I'm not able to get this to work in VS Code.
Example:
- Open
zoo/zoo.ts. - Remove the import statement for
Dog. - Observe that you are unable to auto-import
Dog.
Tested with 3.9.0-dev.20200212 and 3.7.5.
If anyone is interested why, there is an issue open to solve this https://github.com/microsoft/TypeScript/issues/39778.