fix: fix a few TS errors#5437
Conversation
|
✔️ [V2] 🔨 Explore the source changes: 1aa2cc5 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/612cb7fda8e187000787f5a4 😎 Browse the preview: https://deploy-preview-5437--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5437--docusaurus-2.netlify.app/ |
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
|
Okay this is annoying😅 As the Also, the new tsconfig still doesn't do its magic on resolving |
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
slorber
left a comment
There was a problem hiding this comment.
Okay this is annoying😅 As the website is also built into a PWA, it uses the workbox library which requires setting TS compiler to lib: ["webworker"], but "webworker" and "DOM" are incompatible. Therefore running typecheck in website is sure to fail. Not sure what we should do
This seems to fix it:
"exclude": ["src/sw.js"]- Also
skipLibChecks: truebut the 1st is better. I don't think it's too important to type-check this file 🤪
Also, the new tsconfig still doesn't do its magic on resolving @site/ aliases
Weird 🤪 I can't make it work either
I guess it's fine to merge this for now and figure out why the site alias can't be in parent config
|
Added We'll figure out the Thanks 👍 |
|
Okay as long as |
Motivation
The TypeScript compiler screams at me again after bumping to
beta.5when I rantscin my site repo. It turns out that CI checks fall short when it comes to the.d.tsfiles, so these mistakes tend to sneak in unnoticed.Have you read the Contributing Guidelines on pull requests?
Yes
Test plan
This actually works well. Should we add it to the CI?