-
Notifications
You must be signed in to change notification settings - Fork 25
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
error TS2742: The inferred type of 'default' cannot be named without a reference #141
Comments
@danielroe It seems to be related to this ticket egoist/tsup#624 |
Running |
Facing the same issue with custom interfaces |
I think there is a way we can solve this within Something like this would likely work... + import type {} from 'myPackage'
import { defineNuxtPlugin, useAppConfig } from "#imports";
export default defineNuxtPlugin(() => {
return {
provide: {
backend: useAppConfig().endpoints,
},
};
}); See microsoft/TypeScript#58176 (comment) for more about why this is happening. |
Im trying to
pnpm prepack
a nuxt3 module with a package which exports a simple object and its types file.1 - In the
playground/node_modules/myPackage/dist
index.d.ts :
index.js :
2 - In the
playground/app.config.ts
3 - In the module,
src/runtime/plugin.ts
:Then, i run
pnpm prepack
and i always have this error :And the error disappears if i replace the code in the
playground/node_modules/myPackage/dist
by this one :The text was updated successfully, but these errors were encountered: