From 9c3fc30c8176e3f18cb77d42044282ff9437b9e2 Mon Sep 17 00:00:00 2001 From: Alex Hinds Date: Thu, 19 Dec 2019 17:05:56 +1100 Subject: [PATCH] fix: update types to include constants --- index.d.ts | 8 ++++++++ src/bowser.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 46c2230..4ef7345 100644 --- a/index.d.ts +++ b/index.d.ts @@ -22,6 +22,14 @@ declare namespace Bowser { function parse(UA: string): Parser.ParsedResult; + /** + * Constants exposed via bowser getters + */ + const BROWSER_MAP: Record; + const ENGINE_MAP: Record; + const OS_MAP: Record; + const PLATFORMS_MAP: Record; + namespace Parser { interface Parser { constructor(UA: string, skipParsing?: boolean): Parser.Parser; diff --git a/src/bowser.js b/src/bowser.js index f79e6e0..cd20d7c 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -5,7 +5,7 @@ * MIT License | (c) Denis Demchenko 2015-2019 */ import Parser from './parser.js'; -import { +export { BROWSER_MAP, ENGINE_MAP, OS_MAP,