bowser
bowser copied to clipboard
when using with TS cant `bowser.osname` TS complier complains about it.
when using with TS cant bowser.osname
TS complier complains about it.
import * as bowser from 'bowser';
then try to access bowser.osname
it complains that property doesn't exist
Hi, @ruhaise. Which version of bowser are you using? In 2.x version there's no such os-specific properties. I migrated them to more certain API like bowser.isOS('macos')
, which makes the code a bit more human-readable.
@lancedikson Hey thanks for the quick response, im talking about the 1.9.1 version, and what is the API that returns operating system name same as bowser.osname
?
@ruhaise, apologies for the late response, but I haven't been supporting the 1.x version for a while now and not sure what would be the solution for it. Is there any chance you could use the 2.x version? It has a better API and supports more browsers than 1.9.