-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
refactor(v2): add missing theme-classic types #4385
Conversation
[V1] Deploy preview failure Built without sensitive environment variables with commit 23eada4 https://app.netlify.com/sites/docusaurus-1/deploys/604a582940ba6500085cc050 |
Deploy preview for docusaurus-2 ready! Built without sensitive environment variables with commit 23eada4 |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4385--docusaurus-2.netlify.app/classic/ |
} | ||
|
||
declare module '@theme/LastUpdated' { | ||
export type Props = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm unsure if using Props
as a type everywhere is a good idea, but in 90% of cases this name is used.
i was tempted to rename all of them to {ComponentName}Props
but this will be a bigger change, if you think that's a good idea i can do it in separate PR or update this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know
Honestly not very satisfied with our current TS setup, this is a bit annoying to maintain and I'd rather emit types based on our actual code rather than hand-write it as we do today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i'm going to prepare PR for that :)
de043f9
to
23eada4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) LGTM
} | ||
|
||
declare module '@theme/LastUpdated' { | ||
export type Props = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't know
Honestly not very satisfied with our current TS setup, this is a bit annoying to maintain and I'd rather emit types based on our actual code rather than hand-write it as we do today.
Thanks :) Note if you are interested to help us complete our TS types, we have this theme config that is currently very badly typed 😅 |
@slorber i started working on configs already, but i think its better to do this in smaller batches as they are easier to review |
yes definitively :) thanks |
Motivation
Improve types for
theme-classic
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
if compilation passes everything is fine
Related tickets
ref; #3424