-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor(v2): correct plugin types #4418
Conversation
Deploy preview for docusaurus-2 ready! Built without sensitive environment variables with commit de36444 |
Lighthouse Report is failing :( |
[V1] Deploy preview failure Built without sensitive environment variables with commit de36444 https://app.netlify.com/sites/docusaurus-1/deploys/604be7d5ab87570007359a84 |
1 similar comment
[V1] Deploy preview failure Built without sensitive environment variables with commit de36444 https://app.netlify.com/sites/docusaurus-1/deploys/604be7d5ab87570007359a84 |
@@ -114,7 +115,7 @@ For more information, visit https://v2.docusaurus.io/docs/using-plugins.`); | |||
version: pluginVersion, | |||
}; | |||
}) | |||
.filter(Boolean); | |||
.filter(<T>(item: T): item is Exclude<T, null> => Boolean(item)); |
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.
🤪
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.
will merge this, but if you can add a utility fn in docusaurus-utils that would be appreciated :)
https://kentcdodds.com/blog/typescript-function-syntaxes#type-guards
Thanks 👍 |
Motivation
Improve types in docusaurus,
Have you read the Contributing Guidelines on pull requests?
yes