Open js2me opened 8 months ago
I' ve add modified example from documentation about validators in my ts project and got ts errors https://farfetched.pages.dev/tutorial/validators.html
const blockQuery = createQuery<string, Record<string, any>, any>({ effect: createEffect<string, Record<string, any>, any>(async (id: string) => { const response = await fetch(`https://api.salo.com/blocks/${id}.json`); return response.json() as unknown as Record<string, any>; }), validate: ({ result, params }) => result.id === params, });
If I will add more typings for validate property then problem is already exist
validate
validate: ({ result, params, }: { result: Record<string, any>; params: string; }) => result.id === params
P.S. this code works fine in runtime without typescript
I' ve add modified example from documentation about validators in my ts project and got ts errors
https://farfetched.pages.dev/tutorial/validators.html
If I will add more typings for
validate
property then problem is already existP.S. this code works fine in runtime without typescript