From 2ec9519b7d6d1cc0d232853ce05a773953b37c5a Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 19 Nov 2022 20:12:45 -0500 Subject: [PATCH] fix(Footer): add types for ActionDescriptionMap --- src/deck-components/FooterLegend.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/deck-components/FooterLegend.ts b/src/deck-components/FooterLegend.ts index 0bb09b4..cc400cd 100644 --- a/src/deck-components/FooterLegend.ts +++ b/src/deck-components/FooterLegend.ts @@ -29,25 +29,24 @@ export enum GamepadButton { STEAM_GUIDE, STEAM_QUICK_MENU, } - -export enum NavEntryPositionPreferences { +export declare enum NavEntryPositionPreferences { FIRST, LAST, MAINTAIN_X, MAINTAIN_Y, - PREFERRED_CHILD, + PREFERRED_CHILD } - export interface GamepadEventDetail { button: number; is_repeat?: boolean; source: number; } - -export type GamepadEvent = CustomEvent; - +export declare type ActionDescriptionMap = { + [key in GamepadButton]?: string +} +export declare type GamepadEvent = CustomEvent; export interface FooterLegendProps { - actionDescriptionMap?: unknown; + actionDescriptionMap?: ActionDescriptionMap; onOKActionDescription?: string; onCancelActionDescription?: string; onSecondaryActionDescription?: string;