mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Export Parser types
- Move the Parser namespace into the Bowser namespace - Make the Parser class an interface so consumers can't construct a Parser class (this is not exported by bowser)
This commit is contained in:
parent
13e178ccce
commit
96510405be
9
index.d.ts
vendored
9
index.d.ts
vendored
@ -6,7 +6,6 @@ export = Bowser;
|
|||||||
export as namespace Bowser;
|
export as namespace Bowser;
|
||||||
|
|
||||||
declare namespace Bowser {
|
declare namespace Bowser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Parser instance
|
* Creates a Parser instance
|
||||||
* @param {string} UA - User agent string
|
* @param {string} UA - User agent string
|
||||||
@ -22,11 +21,10 @@ declare namespace Bowser {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function parse(UA: string): Parser.ParsedResult;
|
function parse(UA: string): Parser.ParsedResult;
|
||||||
}
|
|
||||||
|
|
||||||
declare namespace Parser {
|
namespace Parser {
|
||||||
class Parser {
|
interface Parser {
|
||||||
constructor(UA: string, skipParsing?: boolean);
|
constructor(UA: string, skipParsing?: boolean): Parser.Parser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get parsed browser object
|
* Get parsed browser object
|
||||||
@ -221,4 +219,5 @@ declare namespace Parser {
|
|||||||
interface checkTree {
|
interface checkTree {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user