-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
refactor: fix a few type inconsistencies #5788
Conversation
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
✔️ [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/ |
@@ -23,6 +23,7 @@ describe('translate', () => { | |||
}); | |||
|
|||
test('reject when no id or message', () => { | |||
// TODO tests are not resolving type defs correctly |
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.
yes, noticed that too, but can't understand why 😓 my union type works in TS playground though...
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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