effector / effector/farfetched
Missing overload for `createQuery` with 'effect' + 'validate'
- Dominant language
- TypeScript
- Stars
- 221
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
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
```ts
const blockQuery = createQuery, any>({
effect: createEffect, any>(async (id: string) => {
const response = await fetch(`https://api.salo.com/blocks/${id}.json`);
return response.json() as unknown as Record;
}),
validate: ({ result, params }) => result.id === params,
});
```

If I will add more typings for `validate` property then problem is already exist
```ts
validate: ({
result,
params,
}: {
result: Record;
params: string;
}) => result.id === params
```

P.S. this code works fine in runtime without typescript
Contributor guide
Assessment
This issue has not been assessed yet.