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

Fixes for --exactOptionalPropertyTypes TS flag #827

Merged
merged 1 commit into from Aug 31, 2021
Merged

Fixes for --exactOptionalPropertyTypes TS flag #827

merged 1 commit into from Aug 31, 2021

Conversation

@geakstr
Copy link
Contributor

@geakstr geakstr commented Aug 31, 2021

TypeScript 4.4 introduced new --exactOptionalPropertyTypes flag. With this flag enabled typescript compiler strictly distinguish between ? and undefined type. Currently @types/react:17.0 package has className?: string | undefined and style?: CSSProperties | undefined specified for html attributes, but linaria types are only marked as ? but undefined. This patch fixes this incompatibility

@callstack-bot
Copy link

@callstack-bot callstack-bot commented Aug 31, 2021

Hey @geakstr, thank you for your pull request 🤗.
The coverage report for this branch can be viewed here.

TypeScript 4.4 introduced new `--exactOptionalPropertyTypes` flag. With this flag enabled typescript compiler strictly distinguish between `?` and `undefined` type. Currently `@types/react:17.0` package has `className?: string | undefined` and `style?: CSSProperties | undefined` specified for html attributes, but linaria types are only marked as `?` but `undefined`. This patch fixes this incompatibility.
Anber
Anber approved these changes Aug 31, 2021
@Anber Anber merged commit eed92b1 into callstack:master Aug 31, 2021
7 checks passed
@Anber
Copy link
Collaborator

@Anber Anber commented Aug 31, 2021

Thank you @geakstr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants