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

[Meta] TypeScript components that need to restrict their children #1890

Closed
2 tasks
chandlerprall opened this issue Apr 26, 2019 · 1 comment
Closed
2 tasks

Comments

@chandlerprall
Copy link
Contributor

chandlerprall commented Apr 26, 2019

Until microsoft/TypeScript#21699 is resolved it is not possible to restrict a children prop to a specific type/shape of React component. Use this ticket to track the places where children should be further restricted when it becomes possible.

  • EuiGlobalToastListItem should only accept EuiToast children
  • EuiValidatableControl's children must accept ref props and expose a setCustomValidity method
@cchaos cchaos added the meta label May 6, 2019
@JasonStoltz JasonStoltz changed the title [META] TypeScript components that need to restrict their children [Meta] TypeScript components that need to restrict their children Jan 23, 2023
@cee-chen
Copy link
Member

Seeing as it's been 4 years, Typescript is showing no movement on resolving this capability, and this is only a nice-to-have, we're closing this issue as not-planned.

@cee-chen cee-chen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants