From ab6a91e13fbae014ceae1f21a78a06556ce14090 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Sun, 28 Jun 2026 07:56:08 +0800 Subject: [PATCH] feat(plugin): update SteamClient type declarations --- plugins/decky-vault/src/types.d.ts | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/plugins/decky-vault/src/types.d.ts b/plugins/decky-vault/src/types.d.ts index b7fc8fb..a7fbb31 100644 --- a/plugins/decky-vault/src/types.d.ts +++ b/plugins/decky-vault/src/types.d.ts @@ -1,31 +1,27 @@ -// Decky Loader API type declarations -// These mirror the APIs available in the Steam Deck game mode CEF context +// Steam Deck CEF context globals — these are Valve's internal APIs, +// available in the Steam Deck game mode browser context. +// Not part of @decky/api; accessed directly from the global scope. declare global { - const DeckyPlugin: { - log: (...args: unknown[]) => void - debug: (...args: unknown[]) => void - info: (...args: unknown[]) => void - error: (...args: unknown[]) => void - } - const SteamClient: { Apps: { - GetAppData: (appId: number) => Promise<{ - strAppName: string - strShortcutName: string - strExePath: string - }> RegisterForGameStarted: ( callback: (appId: number) => void, ) => { unregister: () => void } RegisterForGameStopped: ( callback: (appId: number) => void, ) => { unregister: () => void } + GetCurrentGameInfo: () => Promise<{ + appId: number + strAppName: string + }> } System: { GetOSVersion: () => Promise } + UI: { + GetUIMode: () => Promise + } } }