Fix #718 - Extension param now accept multiple extensions

This commit is contained in:
Faisal Salman
2024-06-06 20:02:22 +07:00
parent f7810dbfcf
commit 0a46ac396a
4 changed files with 32 additions and 10 deletions

View File

@@ -49,7 +49,7 @@ declare namespace UAParser {
type RegexMap = ((RegExp | string | (string | RegExp | Function)[])[])[];
type UAParserProps = 'browser' | 'cpu' | 'device' | 'engine' | 'os';
type UAParserExt = Partial<Record<UAParserProps, RegexMap>>;
type UAParserExt = Partial<Record<UAParserProps, RegexMap>> | Partial<Record<UAParserProps, RegexMap>>[];
export function UAParser(uastring?: string, extensions?: UAParserExt, headers?: Record<string, string>): IResult;
export function UAParser(uastring?: string, headers?: Record<string, string>): IResult;