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

Use more complete implementation of Omit in TypeScript definitions #322

Merged
merged 3 commits into from
Jan 26, 2018

Conversation

weltenwort
Copy link
Member

The TypeScript definitions for EuiContextMenu caused errors that seemed to result from usage of the Omit<> helper. It might be fixed with microsoft/TypeScript#21148, which is expected to be included in 2.7.1.

The types in EuiContextMenu caused errors that seemed to result from
usage of the `Omit<>` helper. It might be fixed with
microsoft/TypeScript#21148, which is expected
to be included in 2.7.1.
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

@weltenwort Would you like a real review or were you just pinging me so I'm aware of this? If the former then I'll need some hand-holding because I have a toddler's understanding of TS.

@weltenwort
Copy link
Member Author

I guess it was more for awareness. I just didn't know whom else to tag, who is familiar with the inner workings of EUI. How do we want to handle upcoming TS PRs?

@snide
Copy link
Contributor

snide commented Jan 19, 2018 via email

The previous implementation of the `Omit` type did not support optional
and readonly fields, which led to type errors when using the
components.
@weltenwort weltenwort changed the title Work around errors in the EuiContextMenu TypeScript definitions Use more complete implementation of Omit in TypeScript definitions Jan 19, 2018
@weltenwort
Copy link
Member Author

Ok, I seem to have found the root cause: The previous implementation of Omit did not preserve the readonly and ? (optional) characteristics of properties. The new implementation apparently does not have that problem.

@weltenwort weltenwort merged commit f362777 into elastic:master Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants