-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: further resolve type of async components #562
fix: further resolve type of async components #562
Conversation
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.
Great enhancement 👏 one comment though 🤔
packages/react/src/react/ssr.tsx
Outdated
* @param value - the value to check | ||
* @returns true if the value is empty, false otherwise | ||
*/ | ||
const isEmpty = (value: any): value is null | undefined => value === null || value === undefined; |
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.
Wouldn't it be better to type the input value as unknown
, same with other checks further below?
const isEmpty = (value: any): value is null | undefined => value === null || value === undefined; | |
const isEmpty = (value: unknown): value is null | undefined => value === null || value === undefined; |
@christian-bromann I updated all the type guards to use As mentioned in #563, the current PR includes everything and covers more So feel free to either close this and merge the other PR or vice versa. Up to you – either change would solve the issue. 🙂 |
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.
LGTM 👍
I am planning to release all output targets today or tomorrow. Thanks again for your contribution! |
Please check if your PR fulfills the following requirements:
npm run build
) was run locally for affected output targetsnpm test
) were run locally and passednpm run prettier
) was run locally and passedPull request type
What is the current behavior?
Issue URL: #561
What is the new behavior?
see Issue
Does this introduce a breaking change?
Other information
None.