diff --git a/index.d.ts b/index.d.ts index 838cf1c..3d6a1e4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -71,12 +71,9 @@ declare interface VMScriptGMInfoObject { platform: VMScriptGMInfoPlatform; /** * A copy of navigator.userAgentData from the content script of the extension. + * Not present in browsers that don't implement this API. * @since VM2.20.2 */ - userAgentData?: { - brands: {brand: string, version: string}[], - mobile: boolean, - platform: string, - }; + userAgentData?: NavigatorUAData; } /** diff --git a/package.json b/package.json index f733de4..3ab7224 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "repository": "git@github.com:violentmonkey/types.git", "devDependencies": { "typedoc": "^0.25.6", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "user-agent-data-types": "^0.4.2" } } diff --git a/tsconfig.json b/tsconfig.json index af24104..323d3b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "allowSyntheticDefaultImports": true }, "include": [ + "./node_modules/user-agent-data-types/index.d.ts", "index.d.ts" ] }