BuilderIO / BuilderIO/gpt-crawler

error TS2322

Open
#151 6 comments 1 reaction 1 assignee Claimed by @marcelovicentegc View on GitHub
Dominant language
TypeScript
Stars
22.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Anyone receiving this error message? Trying to run on Windows.

```
src/core.ts:87:44 - error TS2322: Type '(data: ReadonlyDeep, datasetIdOrName?: string | undefined) => Promise' is not assignable to type '(args_0: any, ...args_1: unknown[]) => Promise'.
Types of parameters 'datasetIdOrName' and 'args_1' are incompatible.
Type 'unknown' is not assignable to type 'string | undefined'.

87 await config.onVisitPage({ page, pushData });
~~~~~~~~

src/config.ts:66:9
66 pushData: z.function().args(z.any()).returns(z.promise(z.void())),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The expected type comes from property 'pushData' which is declared here on type '{ page: Page; pushData: (args_0: any, ...args_1: unknown[]) => Promise; }'

Found 1 error in src/core.ts:87
```

This is the config I am using to test:

![image](https://github.com/BuilderIO/gpt-crawler/assets/10361350/82e10e99-8531-4150-9b96-ea9e57854d8d)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.