Skip to content
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

Resolving global types #797

Closed
Roosteridk opened this issue Jan 28, 2023 · 2 comments · Fixed by denoland/deno#17979
Closed

Resolving global types #797

Roosteridk opened this issue Jan 28, 2023 · 2 comments · Fixed by denoland/deno#17979

Comments

@Roosteridk
Copy link

Describe the bug
Not sure if this is working as intended but Deno VScode doesn't resolve globally declared types unless the types file is open.

To Reproduce

  1. Create a types.ts file.
  2. Add some types inside declare global. Example:
// types.ts
declare global {
  type Foo = { ... }
}
  1. Try to use those types in another file.

Expected behavior
I would expect Deno to automatically resolve globally declared types. Maybe it's a performance thing?

Screenshots
image
image

Versions

vscode: 1.74.3 deno: 1.30.0 extension: 3.17.0

@Roosteridk
Copy link
Author

Also tried using triple slash directives instead, still no luck...

@bartlomieju
Copy link
Member

This is a known bug, that will be fixed by denoland/deno#11190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants