DamonOehlman / detect-browser

Unpack a browser type and version from the useragent string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export Typescript types for Operating System and Browser

jamzi opened this issue · comments

Hey!. Thanks for this package, it's a lifesaver.

I was wondering if you could export Browser and OperatingSystem types from index.d.ts, so we can use them in our apps to get better type safety, instead of just comparing strings for these values.

image

Just wanted to 👍 this -- in our app we've ended up duplicating the type declarations for Browser and OperatingSystem (which can then might drift over time from the ones used by detect-browser).

Super sensible request. I'll add those exports now and publish a new minor version. Apologies for the delay, I'm terrible at keeping track of my issue inbox.

Just published 4.7.0 which includes these types exported.