Skip to content

Commit

Permalink
docs: update Typescript definition file (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheushahnn committed Nov 17, 2023
1 parent 69bc6c2 commit 29222b2
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ declare namespace Bowser {
interface Parser {
constructor(UA: string, skipParsing?: boolean): Parser.Parser;

/**
* Check if the version is equals the browser version
* @param version The string to compare with the browser version
* @returns {boolean}
*/

compareVersion(version: string): boolean;

/**
* Get parsed browser object
* @return {BrowserDetails} Browser's details
Expand Down Expand Up @@ -135,6 +143,39 @@ declare namespace Bowser {

is(anything: any): boolean;

/**
* Check if the browser name equals the passed string
* @param browserName The string to compare with the browser name
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
* @returns {boolean}
*/

isBrowser(browserName: string, includingAlias?: boolean): boolean;

/**
* Check if the engine name equals the passed string
* @param engineName The string to compare with the engine name
* @returns {boolean}
*/

isEngine(engineName: string): boolean;

/**
* Check if the OS name equals the passed string
* @param OSName The string to compare with the OS name
* @returns {boolean}
*/

isOS(OSName: string): boolean;

/**
* Check if the platform name equals the passed string
* @param platformName The string to compare with the platform name
* @returns {boolean}
*/

isPlatform(platformName: string): boolean;

/**
* Parse full information about the browser
* @returns {Parser.Parser}
Expand Down Expand Up @@ -191,16 +232,6 @@ declare namespace Bowser {

satisfies(checkTree: checkTree): boolean | undefined;

/**
* Check if the browser name equals the passed string
* @param browserName The string to compare with the browser name
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
* @returns {boolean}
*/


isBrowser(browserName: string, includingAlias?: boolean): boolean;

/**
* Check if any of the given values satifies `.is(anything)`
* @param {string[]} anythings
Expand Down

0 comments on commit 29222b2

Please sign in to comment.