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

fix: export default theme type #489

Closed
wants to merge 2 commits into from
Closed

Conversation

Estelle00
Copy link

No description provided.

@brc-dd
Copy link
Member

brc-dd commented Jan 7, 2022

Fixes: #483 (comment), #438, #442

x-ref: #484 (comment), #494

@yyx990803
Copy link
Member

yyx990803 commented Jan 15, 2022

I realized this file is no longer necessary - you can just do import { DefaultTheme } from 'vitepress'. My bad, I got confused by the type export!

@brc-dd
Copy link
Member

brc-dd commented Jan 15, 2022

I realized this file is no longer necessary - you can just do import { DefaultTheme } from 'vitepress'.

@yyx990803 That's just the DefaultTheme interface, not the actual default theme. One needs to write import DefaultTheme from 'vitepress/dist/client/theme-default' to get the default theme. But that too has no type definitions as vitepress/dist/client/theme-default/index.d.ts is not bundled. Check #494 for a possible fix.

PS: actually the title of this PR is somewhat confusing. It should be something like: "fix: bundle vitepress/theme type definition file".

@yyx990803 yyx990803 closed this in eabf6d2 Jan 15, 2022
@yyx990803
Copy link
Member

Thanks, #494 is close but the Theme interface is meant as a constraint type instead of the actual type of the default theme. See eabf6d2

@Estelle00 Estelle00 deleted the patch-1 branch January 17, 2022 02:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants