Open MCFX2 opened 1 month ago
I can reproduce this issue.
According to the TypeScript document:
Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope (and therefore to modules as well).
I think the correct behavior is to ignore any unused type declarations in such files because the moment they are defined, they can be accessed from the global in other files directly, or via /// <reference types="xxx" />
.
To be more sepecific, type declarations should be ignored by this rule when:
.d.ts
Environment information
What happened?
vite-env.d.ts
to define anImportMeta
(which is used for type-safe env configs)interface ImportMeta { readonly env: ImportMetaEnv; }