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.
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.
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.
ok i'm going to prepare PR for that :)
de043f9 to
23eada4
Compare
| } | ||
|
|
||
| declare module '@theme/LastUpdated' { | ||
| export type Props = { |
There was a problem hiding this comment.
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-classicHave you read the Contributing Guidelines on pull requests?
yes
Test Plan
if compilation passes everything is fine
Related tickets
ref; #3424