puppeteer-stream
puppeteer-stream copied to clipboard
Typescript issue not perfectly fixed
Hi, I've just tried. It fixes all of those errors but one:
node_modules/puppeteer-stream/dist/PuppeteerStream.d.ts:8:5 - error TS2416: Property 'destroy' in type 'Stream' is not assignable to the same property in base type 'Readable'.
Type '() => Promise<void>' is not assignable to type '(error?: Error | undefined) => this'.
Type 'Promise<void>' is not assignable to type 'this'.
'this' could be instantiated with an arbitrary type which could be unrelated to 'Promise<void>'.
8 destroy(): Promise<void>;
~~~~~~~
Found 1 error.
I can't reopen the issue so I create a new one.
Originally posted by @euberdeveloper in https://github.com/Flam3rboy/puppeteer-stream/issues/36#issuecomment-1030717161
I'll fix it, but when you build your project, typescript shouldn't type check node_module dependencies. You can configure it inside tsconfig.json.
Thanks!
But to be checked are not the .ts but the .d.ts, shouldn't the type declarations that are used be checked?
I tried it, it could be convenient, the transpilation takes half of the time👍🏻
Done in c420bc4