Skip to content

refactor(v2): correct plugin types#4418

Merged
slorber merged 1 commit into
facebook:masterfrom
armano2:type/plugins
Mar 15, 2021
Merged

refactor(v2): correct plugin types#4418
slorber merged 1 commit into
facebook:masterfrom
armano2:type/plugins

Conversation

@armano2

@armano2 armano2 commented Mar 12, 2021

Copy link
Copy Markdown
Contributor

Motivation

Improve types in docusaurus,

Have you read the Contributing Guidelines on pull requests?

yes

@armano2
armano2 requested review from lex111 and slorber as code owners March 12, 2021 22:14
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 12, 2021
@armano2 armano2 changed the title fix(v2): correct plugin types refactor(v2): correct plugin types Mar 12, 2021
@netlify

netlify Bot commented Mar 12, 2021

Copy link
Copy Markdown

Deploy preview for docusaurus-2 ready!

Built without sensitive environment variables with commit de36444

https://deploy-preview-4418--docusaurus-2.netlify.app

@armano2

armano2 commented Mar 12, 2021

Copy link
Copy Markdown
Contributor Author

Lighthouse Report is failing :(

@netlify

netlify Bot commented Mar 14, 2021

Copy link
Copy Markdown

1 similar comment
@netlify

netlify Bot commented Mar 14, 2021

Copy link
Copy Markdown

};
})
.filter(Boolean);
.filter(<T>(item: T): item is Exclude<T, null> => Boolean(item));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤪

Copy link
Copy Markdown
Collaborator

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

@slorber slorber added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Mar 15, 2021
@slorber

slorber commented Mar 15, 2021

Copy link
Copy Markdown
Collaborator

Thanks 👍

@slorber
slorber merged commit abae86f into facebook:master Mar 15, 2021
@lex111 lex111 added this to the v2.0.0-alpha.72 milestone Mar 15, 2021
@armano2
armano2 deleted the type/plugins branch March 16, 2021 06:38
This was referenced Mar 17, 2021
This was referenced Mar 17, 2021
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
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.

4 participants