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
Puppeteer 10 turns out to be incompatible with types defined in Mockiavelli (PuppeteerController.ts file). When both are used in project, following TypeScript error is shown:
TS2345: Argument of type 'Page' is not assignable to parameter of type 'BrowserPage'.
Type 'Page' is not assignable to type 'PuppeteerPage'.
Types of property 'on' are incompatible.
Type '<K extends keyof PageEventObject>(eventName: K, handler: (event: PageEventObject[K]) => void) => EventEmitter' is not assignable to type '(eventName: "request", handler: (e: PuppeteerRequest) => void) => any'.
Types of parameters 'handler' and 'handler' are incompatible.
Types of parameters 'e' and 'event' are incompatible.
Type 'HTTPRequest' is not assignable to type 'PuppeteerRequest'.
The types returned by 'method()' are incompatible between these types.
Type 'string' is not assignable to type '"GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "OPTIONS"'.
Probably method() function return type should be widened to string to match type defs in Puppeteer
The text was updated successfully, but these errors were encountered:
Fiszcz
added a commit
to Fiszcz/mockiavelli
that referenced
this issue
Jun 21, 2021
Hi,
Puppeteer 10 turns out to be incompatible with types defined in Mockiavelli (PuppeteerController.ts file). When both are used in project, following TypeScript error is shown:
Probably
method()
function return type should be widened to string to match type defs in PuppeteerThe text was updated successfully, but these errors were encountered: