-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Milestone
Description
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: ({
result,
params,
}: {
result: Record<string, any>;
params: string;
}) => result.id === paramsP.S. this code works fine in runtime without typescript

