refactor(types): split into multiple files#7710
Conversation
| // TODO improve type (not exposed by postcss-loader) | ||
| export type PostCssOptions = {plugins: unknown[]; [key: string]: unknown}; | ||
|
|
||
| type HtmlTagObject = { |
There was a problem hiding this comment.
not sure why: this type was not exported from this package and yet it was imported successfully in Docusaurus core 🤷♂️
There was a problem hiding this comment.
Because this is a d.ts file with no value export, so it's still ambient. We can fix this by adding an export {}.
There was a problem hiding this comment.
Ah I see 😅
Not very familar with those TS rules and value exports, where is this documented? Should we add export {} to all those .d.ts files?
There was a problem hiding this comment.
This is the only file where we have a hand-written d.ts that's not ambient module declarations, AFAICT.
Last time I looked for it, there was no docs, only one GH issue. On my phone atm; I can share the link later.
There was a problem hiding this comment.
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: 0 B Total Size: 802 kB ℹ️ View Unchanged
|
Josh-Cena
left a comment
There was a problem hiding this comment.
Last time I tried to split it, I couldn't convince myself of any kind of splitting because all types are interconnected. I think this is good enough.
Pre-flight checklist
Motivation
Split our
@docusaurus/typesto separate into it subdomains, making the list of exports and the dependency between subdomains clearer.No type was refactored, it is just a split and the public API of this package remains the same as before.
Test Plan
CI