refactor: fix a few type inconsistencies#5788
Conversation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
|
✔️ [V2] 🔨 Explore the source changes: 69fe2a0 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/617747d01e109c0007b543f8 😎 Browse the preview: https://deploy-preview-5788--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5788--docusaurus-2.netlify.app/ |
| }); | ||
|
|
||
| test('reject when no id or message', () => { | ||
| // TODO tests are not resolving type defs correctly |
There was a problem hiding this comment.
yes, noticed that too, but can't understand why 😓 my union type works in TS playground though...
There was a problem hiding this comment.
It's not picking up any type at all (the types are any), because they are coming down from the .d.ts files, I guess?
There was a problem hiding this comment.
I don't know, but for sure we don't use TS well on tests, there are many places with type errors that are not reported by CI (I guess it was something temporary, but in the end the CI should also check tests with tsc).
There was a problem hiding this comment.
Yes, right now tsc ignores test files. We should typecheck these with a separate workflow with --noEmit, maybe after #5612 :P (Going to spend a while playing with the TS API)
|
Thanks, LGTM 👍 |
Motivation
Fix #5785. Also fixed a few
@ts-expect-error.Have you read the Contributing Guidelines on pull requests?
Yes