mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
react-autocomplete: fix renderMenu param type (#34183)
* Add failing test * Fix failing test
This commit is contained in:
parent
0f4522b7c8
commit
d37eb74cea
2
types/react-autocomplete/index.d.ts
vendored
2
types/react-autocomplete/index.d.ts
vendored
@ -76,7 +76,7 @@ declare namespace Autocomplete {
|
||||
* and the width of the dropdown menu.
|
||||
*/
|
||||
renderMenu?: (
|
||||
items: any[],
|
||||
items: ReactNode[],
|
||||
value: string,
|
||||
styles: CSSProperties,
|
||||
) => ReactNode;
|
||||
|
||||
@ -16,3 +16,8 @@ render(
|
||||
/>,
|
||||
container,
|
||||
);
|
||||
|
||||
// $ExpectError
|
||||
const renderMenu: React.ComponentProps<typeof Autocomplete>['renderMenu'] = (
|
||||
(item: string[]) => <div></div>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user