Skip to content

refactor: fix a few type inconsistencies#5788

Merged
slorber merged 4 commits intofacebook:mainfrom
Josh-Cena:ts-expect-error
Oct 27, 2021
Merged

refactor: fix a few type inconsistencies#5788
slorber merged 4 commits intofacebook:mainfrom
Josh-Cena:ts-expect-error

Conversation

@Josh-Cena
Copy link
Collaborator

Motivation

Fix #5785. Also fixed a few @ts-expect-error.

Have you read the Contributing Guidelines on pull requests?

Yes

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@netlify
Copy link

netlify bot commented Oct 26, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 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

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 94
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5788--docusaurus-2.netlify.app/

@Josh-Cena Josh-Cena changed the title refactor: improve a few type inconsistencies refactor: fix a few type inconsistencies Oct 26, 2021
});

test('reject when no id or message', () => {
// TODO tests are not resolving type defs correctly
Copy link
Collaborator

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...

Copy link
Collaborator Author

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?

Copy link
Collaborator

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).

Copy link
Collaborator Author

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)

@slorber
Copy link
Collaborator

slorber commented Oct 27, 2021

Thanks, LGTM 👍

@slorber slorber added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Oct 27, 2021
@slorber slorber merged commit 7299072 into facebook:main Oct 27, 2021
@Josh-Cena Josh-Cena deleted the ts-expect-error branch October 27, 2021 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(theme-classic): error TS7008 Member 'permalink' implicitly has an 'any' type.

3 participants