Skip to content

Cannot import from a type-only package #6791

Answered by hi-ogawa
FelixGirard asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure the intent but probably it shouldn't be necessary to import @types/... package. Either using compilerOptions.types in tsconfig or tsc should already pick that typing automatically.

Btw, node also throws for import '@types/base64-js' and it's not a Vitest issue. This is more like a typescript question, so probably it's better to be asked elsewhere.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FelixGirard
Comment options

Answer selected by FelixGirard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #6788 on October 25, 2024 08:33.