Merge pull request #382 from DarkPurple141/types-update

fix: update types to include constants in types.d.ts
pull/390/head
Denis Demchenko 4 years ago committed by GitHub
commit 406e39d2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
index.d.ts vendored

@ -22,6 +22,14 @@ declare namespace Bowser {
function parse(UA: string): Parser.ParsedResult;
/**
* Constants exposed via bowser getters
*/
const BROWSER_MAP: Record<string, string>;
const ENGINE_MAP: Record<string, string>;
const OS_MAP: Record<string, string>;
const PLATFORMS_MAP: Record<string, string>;
namespace Parser {
interface Parser {
constructor(UA: string, skipParsing?: boolean): Parser.Parser;

@ -74,4 +74,10 @@ class Bowser {
}
}
export {
BROWSER_MAP,
ENGINE_MAP,
OS_MAP,
PLATFORMS_MAP,
} from './constants.js';
export default Bowser;

Loading…
Cancel
Save