Skip to content
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(module-type-aliases): remove fallback aliases #5726

Merged
merged 5 commits into from
Oct 20, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

These are often loopholes for missing definitions and future bugs. To keep things strict, let's remove the legacy fallbacks.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Build & typecheck still passes

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 17, 2021
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@netlify
Copy link

netlify bot commented Oct 17, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: a869d8c

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/616bfd369fb3170007022d8c

😎 Browse the preview: https://deploy-preview-5726--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Oct 17, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
}

declare module '@theme/NotFound' {
export default function NotFound(props: any): JSX.Element;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the NotFound actually receive props?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slorber I actually haven't figured this out🤔 To prevent potential breaking changes I didn't remove the props, but from the implementation it seems there's no props

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually I think we should remove props here.

I think React-Router automatically injects some props in all the declared route components, but I'm not sure we should expose those in practice, as it couples too much to the routing system and in all cases, it's still possible to use React-Router hooks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense. I guess the {...props} on DocPage was just a mistake (due to NotFound not being properly typed before). Will be fixed later

@slorber slorber added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Oct 20, 2021
@slorber
Copy link
Collaborator

slorber commented Oct 20, 2021

Thanks 👍 makes sense

@slorber slorber merged commit 90098ca into facebook:main Oct 20, 2021
@Josh-Cena Josh-Cena deleted the strict-module-alias branch October 20, 2021 13:30
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.

None yet

3 participants