You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autoimports' typeFrom property not used to generate declaration files #3669
Look for a foo const; its type is string, but should be string | number | boolean (see pkg/dts/index.d.ts).
Describe the bug
Nitro does not use the typeFrom option of registered autoimports to generate declaration files, which may cause type declarations to not be found.
Nitro uses unimport's generateTypeDeclarations to generate declaration files' content, which supports the typeFrom option. However, a custom resolver that is missing typeFrom support is provided.
Generated exports with toExports should likewise use typeFrom if provided, but toExports does not currently support typeFrom. I submitted a PR to address this too.
Activity