get-browser-fingerprint
get-browser-fingerprint copied to clipboard
@types?
Would be awesome to be able to use this natively with Typescript
@damianobarbati I would like to work on it. You have prefer build framework? I see vitest
already. So vite
?
Can give you also a tsc
-only solution :)
@Sysix what's the simplest one? I'm assuming a post-build step with tsc. What you think?
@damianobarbati I created a simple build step with tsc
. Some other ToDo's needed to be done by you :)
nice! thanks @Sysix @damianobarbati
@damianobarbati u had any time to look into the PR? I could get more into it with backwards testing and co.
When sombody needs a definition before the next release, you can put this code in your global declarations:
declare global {
interface Window {
getBrowserFingerprint: ({ hardwareOnly, enableWebgl, enableScreen, debug, }?: {
hardwareOnly?: boolean;
enableWebgl?: boolean;
enableScreen?: boolean;
debug?: boolean;
}) => number;
}
}
is there any work around for the @types ?
Have tried using it in React app, the build fails without @types
.
--Edit-- Hm, I tried it again and it worked. But I still have typescript errors though. I can't reproduce the build error anymore. 🤔