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

[Typescript] @material/lab ToggleButton type attribute typing needs to be updated #15200

Closed
2 tasks done
majames opened this issue Apr 4, 2019 · 2 comments
Closed
2 tasks done
Labels
component: toggle button This is the name of the generic UI component, not the React module! typescript

Comments

@majames
Copy link

majames commented Apr 4, 2019

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

TypeScript to compile my react code.

Current Behavior 😯

Exact same issue as described HERE except it is occurring for the @material-ui/lab package.

../../../node_modules/@material-ui/lab/ToggleButton/ToggleButton.d.ts(6,18): error TS2430: Interface 'ToggleButtonProps' incorrectly extends interface 'Pick<ButtonBaseProps, "media" | "color" | "hidden" | "style" | "disabled" | "form" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 269 more ... | "TouchRippleProps"> & StyledComponentProps<...> & { ...; }'.
  Type 'ToggleButtonProps' is not assignable to type 'Pick<ButtonBaseProps, "media" | "color" | "hidden" | "style" | "disabled" | "form" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 269 more ... | "TouchRippleProps">'.
    Types of property 'type' are incompatible.
      Type 'string | undefined' is not assignable to type '"reset" | "button" | "submit" | undefined'.
        Type 'string' is not assignable to type '"reset" | "button" | "submit" | undefined'.

Steps to Reproduce 🕹

NA

Context 🔦

Build dope stuff

Your Environment 🌎

@material-ui/[email protected]
@types/react@latest
typescript@latest

@majames
Copy link
Author

majames commented Apr 4, 2019

Here's a PR fixing #15202 🙂

@oliviertassinari oliviertassinari added component: toggle button This is the name of the generic UI component, not the React module! typescript labels Apr 4, 2019
@oliviertassinari
Copy link
Member

It's fixed in v4.0.0-alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toggle button This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

No branches or pull requests

2 participants