The type definitions for ua-parser-js are missing undefined on
its return values. UAParser will return undefined if given an
invalid user agent string, and will also return undefined on
values that can't be figured out based on a valid string.
For instance:
const UAParser = require("ua-parser-js")
const ua = new UAParser("Fake ua")
console.log(ua.getBrowser().name) // undefined
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.