mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Correct ua-parser-js's export
ua-parser-js is _not_ an ES module; it is a handwritten AMD module. It exports itself both by setting the UAParser class as the export and adding a self-reference with the same name, which is why the current definition happens to work with the current commonjs emit.
This commit is contained in:
Vendored
+3
-2
@@ -139,7 +139,7 @@ declare namespace IUAParser {
|
||||
}
|
||||
|
||||
declare module "ua-parser-js" {
|
||||
export class UAParser {
|
||||
class UAParser {
|
||||
static VERSION: string;
|
||||
static BROWSER: IUAParser.BROWSER;
|
||||
static CPU: IUAParser.CPU;
|
||||
@@ -192,5 +192,6 @@ declare module "ua-parser-js" {
|
||||
*/
|
||||
getResult(): IUAParser.IResult;
|
||||
}
|
||||
const exported: typeof UAParser & { UAParser: UAParser };
|
||||
export = exported
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user