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

Type error with "declaration": true #119

Open
BryceRussell opened this issue May 30, 2024 · 0 comments
Open

Type error with "declaration": true #119

BryceRussell opened this issue May 30, 2024 · 0 comments
Labels
bug Something isn't working has workaround Bug with a known workaround

Comments

@BryceRussell
Copy link
Member

BryceRussell commented May 30, 2024

If someone authors a theme inside a monorepo with a tsconfig.json that includes "declaration": true, the defineTheme function shows a type error

The inferred type of 'default' cannot be named without a reference to './node_modules/astro-theme-provider/dist/internal/types.js'. This is likely not portable. A type annotation is necessary.

Related issue: microsoft/TypeScript#47663

Workaround: re-export AuthorOptions and UserOptions

need example

@BryceRussell BryceRussell added bug Something isn't working has workaround Bug with a known workaround labels May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has workaround Bug with a known workaround
Projects
None yet
Development

No branches or pull requests

1 participant