bowser icon indicating copy to clipboard operation
bowser copied to clipboard

when using with TS cant `bowser.osname` TS complier complains about it.

Open ruhaise opened this issue 4 years ago • 3 comments

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

ruhaise avatar Jun 05 '20 14:06 ruhaise

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 avatar Jun 05 '20 14:06 lancedikson

@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 avatar Jun 05 '20 16:06 ruhaise

@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.

lancedikson avatar Jul 09 '20 19:07 lancedikson