-
-
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
fix: fix a few TS errors #5437
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 <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Okay this is annoying😅 As the Also, the new tsconfig still doesn't do its magic on resolving |
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
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.
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: true
but 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
packages/docusaurus-init/templates/classic-typescript/tsconfig.json
Outdated
Show resolved
Hide resolved
Added We'll figure out the Thanks 👍 |
Okay as long as |
Motivation
The TypeScript compiler screams at me again after bumping to
beta.5
when I rantsc
in my site repo. It turns out that CI checks fall short when it comes to the.d.ts
files, 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?