Closed shiny closed 8 months ago
Library version 2.0.0-beta.2
Describe the bug When using an extension, such as Bots, the result has an attribute browser.type, but not exists in type IBrowser.
Bots
browser.type
To Reproduce
import { UAParser } from 'ua-parser-js' import { Bots } from 'ua-parser-js/extensions' const ua = 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/W.X.Y.Z Safari/537.36' const parser = new UAParser(ua, Bots) const browser = parser.getBrowser()
Now browser is
browser
{ "name": "Googlebot", "version": "2.1", "major": "2", "type": "bot" }
But IBrowser is
interface IBrowser extends IData<IBrowser> { name?: string; version?: string; major?: string; }
type?: string is missing
type?: string
Expected behavior
interface IBrowser extends IData<IBrowser> { name?: string; version?: string; major?: string; type?: string; }
Library version 2.0.0-beta.2
Describe the bug When using an extension, such as
Bots
, the result has an attributebrowser.type
, but not exists in type IBrowser.To Reproduce
Now
browser
isBut IBrowser is
type?: string
is missingExpected behavior