From 3544195aebaab2e77109779bd8c2a220c1f2eab2 Mon Sep 17 00:00:00 2001 From: Alex Hinds Date: Mon, 6 Jan 2020 15:52:14 +1100 Subject: [PATCH 1/2] remove re-export --- src/bowser.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/bowser.js b/src/bowser.js index 9b1449e..f79e6e0 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -74,10 +74,4 @@ class Bowser { } } -export { - BROWSER_MAP, - ENGINE_MAP, - OS_MAP, - PLATFORMS_MAP, -} from './constants.js'; export default Bowser; From 7ebcbd799b0f43254360f831ad5c5bbab54a7d29 Mon Sep 17 00:00:00 2001 From: Alex Hinds Date: Mon, 6 Jan 2020 15:54:39 +1100 Subject: [PATCH 2/2] include types --- index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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;