fingerprintjs / BotD

Bot detection library that runs in the browser. Detects automation tools and frameworks. No server required, runs 100% on the client. MIT license, no usage restrictions.
https://fingerprintjs.github.io/BotD/main/
MIT License
954 stars 77 forks source link

Additional types in exports #121

Closed dartess closed 1 year ago

dartess commented 1 year ago

HI! Can you please export BotDetectionResult from package?

Now the type can also be obtained, but this can only be done with a terrible construction like this:

type BotDetectionResult = ReturnType<
  (ReturnType<typeof load> extends Promise<infer T> ? T : never)['detect']
>;
xnerhu commented 1 year ago

Hi! Good catch, we will publish this feature soon.

xnerhu commented 1 year ago

Published in 1.5.0.