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

Simplify typescript recommendations #685

Open
silverwind opened this issue Apr 8, 2024 · 3 comments
Open

Simplify typescript recommendations #685

silverwind opened this issue Apr 8, 2024 · 3 comments

Comments

@silverwind
Copy link
Contributor

silverwind commented Apr 8, 2024

The docs currently seem to recommend adding .d.ts files:

I had success by just adding to compilerOptions.types in tsconfig.json. Maybe that's all that is needed?

  "compilerOptions": {
    "types": [
      "jest-extended",
    ],
  },

In case vitest globals are in use, one can add vitest/globals to that array.

@keeganwitt
Copy link
Collaborator

Those recommendations were so you could get autocomplete working in things like VS Code IIRC.

@silverwind
Copy link
Contributor Author

silverwind commented Apr 8, 2024

I got autocomplete working with above in Sublime Text LSP-typescript:

image

@silverwind
Copy link
Contributor Author

Edited above, it appears VSCode uses a different LSP called tsserver, but I can't imagine that one failing on those types, but I will test it later.

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

No branches or pull requests

2 participants