-
Notifications
You must be signed in to change notification settings - Fork 139
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
Declaration merging is detected only if the file is open is VSCode #561
Comments
Is this still being worked on? Is there a workaround for this? |
@dsherret could you recent refactor to the LSP fix this problem? |
No. If the file is closed and isn't discoverable by the module graph from any files then it won't be found. The way to make it work is to ensure the declaration merging occurs is to import |
Thank you for your quick response @dsherret @bartlomieju Is this planned to be fixed in the future? |
One workaround for this is to have a file (i name it // declarations.helper.ts
import '../a.ts'; // have declaration merging inside them (declare module)
import '../b.ts';
import '../c.ts'; This helps a lot if you have some amount of files that does this. |
Closes denoland/vscode_deno#797 Closes #11190 Closes denoland/vscode_deno#811 Closes denoland/vscode_deno#761 Closes denoland/vscode_deno#585 Closes denoland/vscode_deno#561 Closes denoland/vscode_deno#410
Explain the bug
Declaration merging is detected by the VSCode only if the file that specifies the additional interface options is fully open. as soon as the file closes, VSCode gives out errors.
To Reproduce
These are the files needed
b.ts
file and as soon as you make a change inc.ts
file (to trigger linting i guess) an error is given which indicatesphoneNumber
is invalid.b.ts
file again and make a change inc.ts
file and everything is okExpected behavior
A file being open or close should not change the linting behavior. Also note that the deno itself is ok with this and correctly handles declaration merging.
Versions
vscode: 1.61.0 deno: 1.14.3 extension: 3.9.1
The text was updated successfully, but these errors were encountered: