-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intellisense does not pickup Typescript 3 references #26913
Comments
From the TypeScript Handbook: https://www.typescriptlang.org/docs/handbook/project-references.html
|
I have a similar problem. Is this a duplicate or is my example different? https://github.com/donaldpipowitch/typescript-refactoring-references |
Getting the same issue, have to compile a project for its type intellisense in other projects to update when changes are made. It's a big problem for a repo I'm working on that has 19 different package references. When running the tsc watch, it can take over 15 sec for a typing to update. |
Running into the same issue in our mono-repo. This is labeled as |
Correct me if I’m wrong, but since vscode relys on TSServer for providing information for intellesence, and the new References feature uses the output .d.ts for each project for typing; the TSServer would have to have a way to bypass the .d.ts files and directly go to the source to determine typings. I would think that this is a TS issue and not only VSCode. |
Anything I can do to help this get fixed? |
I would like to bump this issue. We are running into this problem in our monorepo and it's making development more difficult in particular for newcomers. |
I have a sample project that uses project reference. You need to set properly baseUrl to the top level output and this should enable type checks to work https://github.com/wmira/react-ts-starter/tree/master/project-reference |
@wmira That's the current workaround, at least what my team uses. Ideally vscode would understand types as you change them without the watch running or having to run tsc build (which I believe is the issue outlined by mjvbz). |
@wmira I'm confused about your setup. Why are these properties directories that do not exist? Also, this still means that you have to compile the typscript to get references to work. As I understand the issue, this is the main problem, not that references do not work at all. |
its going to get created when you compile..from the top level. baseUrl is
used by ts to resolved relative paths. E.g. do a tsc --build from the
project-reference project
…On Wed, May 1, 2019, 4:32 PM Dominik Moritz ***@***.***> wrote:
@wmira <https://github.com/wmira> I'm confused about your setup. Why are these
properties
<https://github.com/wmira/react-ts-starter/blob/2ca6ed40242b2cf08e183f5966611d22c2138ebf/project-reference/core/tsconfig.json#L4>
directories that do not exist? Also, this still means that you have to
compile the typscript to get references to work. As I understand the issue,
this is the main problem, not that references do not work at all.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26913 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSMEHWTI2536XYEZVRABLPTFISLANCNFSM4FTNWJZA>
.
|
I see. But I still have to compile (and re-compile) to get working jump-to-reference in VSCode across project boundaries. Unfortunately, that's a huge UX problem. |
@wmira i just gave your sample a try. However, if you delete It seems that once you include that line, that vscode can find all the symbols within module1/util fine, but before that it can't pick it up. Likewise, if you add a new file, say Is that something that you were able to overcome with a workaround? |
Just poking to ask if there is any progress on this. 🤓 I see it’s labeled as |
I definitely think this fix is high priority. I my case (yarn workspaces with nohoist and typescript modules) I haven't been able to find a good workaround. |
The initial issue is fixed by #32028. |
I'm not quite sure what the proposed fix actually is. Ended up using |
Is this fixed? Seems like it isn't and this is the current behaviour:
|
From @tommedema on August 27, 2018 3:12
Steps to Reproduce:
git clone [email protected]:tommedema/serverless-mono-example.git
cd serverless-mono-example && yarn install && code .
random
, it is not picked up by intellisense in typescript packages that reference to it in the same workspace (e.g.sls-random
); you'd have to compile firstfor example, change
fetchRandomNumber
inrandom
to return aPromise<string>
, andsls-random
still expects aPromise<number>
Note that
sls-random
is connected withrandom
through Typescript 3 references:And therefore intellisense should pickup the referenced typings dynamically.
Does this issue occur when all extensions are disabled?: Yes
Copied from original issue: microsoft/vscode#57242
The text was updated successfully, but these errors were encountered: