Fix d.ts Record for extensions as Partial

This commit is contained in:
Faisal Salman 2023-11-30 11:50:44 +07:00
parent e4f2463849
commit 3622b614a7

View File

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