You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
Following react admin tutorial
ListGuesser tsx gives error below
What happened instead:
Argument of type '{ table: { component: (props: any) => Element; representation: (_props: any, children: any) => string; }; array: { component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }; ... 11 more ...; url: { ...; }; }' is not assignable to parameter of type 'InferredTypeMap'.
Property 'array' is incompatible with index signature.
Type '{ component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }' is not assignable to type 'InferredType'.
Types of property 'component' are incompatible.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'ComponentType | undefined'.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'FunctionComponent<{}>'.
Types of parameters '__0' and 'props' are incompatible.
Property 'source' is missing in type '{}' but required in type 'ArrayFieldProps<Record<string, any>>'.ts(2345)
types.ts(59, 5): 'source' is declared here.
What you were expecting:
Following react admin tutorial
ListGuesser tsx gives error below
What happened instead:
Argument of type '{ table: { component: (props: any) => Element; representation: (_props: any, children: any) => string; }; array: { component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }; ... 11 more ...; url: { ...; }; }' is not assignable to parameter of type 'InferredTypeMap'.
Property 'array' is incompatible with index signature.
Type '{ component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }' is not assignable to type 'InferredType'.
Types of property 'component' are incompatible.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'ComponentType | undefined'.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'FunctionComponent<{}>'.
Types of parameters '__0' and 'props' are incompatible.
Property 'source' is missing in type '{}' but required in type 'ArrayFieldProps<Record<string, any>>'.ts(2345)
types.ts(59, 5): 'source' is declared here.
Steps to reproduce:
Related code:
https://codesandbox.io/p/github/marmelab/react-admin-sandbox/main (v5)
https://stackblitz.com/github/marmelab/react-admin/tree/master/examples/simple (v5)
https://stackblitz.com/github/marmelab/react-admin/tree/4.x/examples/simple (v4)
Other information:
Environment
The text was updated successfully, but these errors were encountered: