From 35c87aa51f111b6fa226de022d05bdfcb2054870 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 27 Jul 2024 22:13:22 +0300 Subject: [PATCH] +getHighEntropyValues --- index.d.ts | 2 ++ package.json | 3 ++- tsconfig.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 838cf1c..e254f36 100644 --- a/index.d.ts +++ b/index.d.ts @@ -71,11 +71,13 @@ 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, + getHighEntropyValues(hints: string[]): Promise, }; } 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" ] }