joseluisq / printd

Print HTML elements or pages in modern browsers.
MIT License
80 stars 5 forks source link

Unsafe typing of PrintdCallbackArgs.launchPrint #26

Open jraoult opened 1 month ago

jraoult commented 1 month ago

Using Function to type a function is not ideal in typescript and is now considered unsafe by typescript-eslint (see the rationale here: https://github.com/typescript-eslint/typescript-eslint/issues/9108) so that calling launchPrint() now fails in my lint stage.

I checked the source code, and it turns out it should be pretty easy to fix by declaring launchPrint: () => void since it is not supposed to return anything.

I am happy to create a PR if you need me to.

joseluisq commented 1 month ago

Sure, feel free to contribute.