No overload matches this call.
Overload 1 of 2, '(props: { component: ElementType<any>; } & { avatar?:
ReactElement<any, string | ((props: any) => ReactElement<any, string | ... |
(new (props: any) => Component<any, any, any>)> | null) | (new (props: any)
=> Component<...>)> | undefined; ... 9 more ...; variant?: "default" | ... 1
more ... | undefined; } & CommonProps<...> & Pick<...>): Element', gave the
following error.
Property 'component' is missing in type '{ label: string; onClick: () =>
void; disableRipple: true; }' but required in type '{ component:
ElementType<any>; }'.
Overload 2 of 2, '(props: DefaultComponentProps<ChipTypeMap<{}, "div">>):
Element', gave the following error.
Type '{ label: string; onClick: () => void; disableRipple: true; }' is not
assignable to type 'IntrinsicAttributes & { avatar?: ReactElement<any,
string | ((props: any) => ReactElement<any, string | ... | (new (props:
any) => Component<any, any, any>)> | null) | (new (props: any) =>
Component<...>)> | undefined; ... 9 more ...; variant?: "default" | ... 1
more ... | undefined; } & CommonProps<...> & Pick<...>'.
Property 'disableRipple' does not exist on type 'IntrinsicAttributes & {
avatar?: ReactElement<any, string | ((props: any) => ReactElement<any,
string | ... | (new (props: any) => Component<any, any, any>)> | null)
| (new (props: any) => Component<...>)> | undefined; ... 9 more ...;
variant?: "default" | ... 1 more ... | undefined; } & CommonProps<...>
& Pick<...>'.ts(2769)
OverridableComponent.d.ts(17, 7): 'component' is declared here.
Current Behavior 😯
disableRippleworks as expected, however a TypeScript error is thrown.TypeScript error
Expected Behavior 🤔
No TypeScript error should be thrown.
Steps to Reproduce 🕹
Steps:
disableRippleprop to a Chip.https://codesandbox.io/s/divine-star-nimfs?file=/src/Demo.tsx
Your Environment 🌎
tsconfig.json
{ "include": [ "./src/**/*" ], "compilerOptions": { "strict": true, "esModuleInterop": true, "lib": [ "dom", "es2015" ], "jsx": "react" } }