-
Notifications
You must be signed in to change notification settings - Fork 149
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
TypeScript Omit with StrictReactDOMProps results into empty object #113
Comments
Probably has to do something with I just added: type ReactStrictDOMDataProps = {} |
Just found out that also I guess both |
I think TypeScript has a feature where it ignores any |
Yes exactly, TypeScript ignores all props in JSX containing |
@necolas I still think that having these types exported from files gives us the most flexibility. We can override particular files for TS easily that way. |
Sure. TS doesn't even need that file though |
Can you just strip those types in TS? Replace |
Describe the issue
When using
Omit
in TypeScript it seems to omit everything. Example:This results in
IconButtonProps
type having the ONLYchildren
, and some stuff fromReactStrictDOMDataProps
, but nothing else. Every other prop, coming fromhtml.button
is also omitted. When removing theOmit<...>
everything works fine.This is maybe a bug with Flow to TypeScript conversion?
Expected behavior
Omitting props should only omit what is wanted.
Steps to reproduce
children
Test case
No response
Additional comments
No response
The text was updated successfully, but these errors were encountered: