docs: fix CfgSettings/DataSourceItem to satisfy JsonObject in plan

This commit is contained in:
2026-08-14 10:47:20 -06:00
parent 8818dac640
commit 06eb23bd6a
@@ -254,12 +254,14 @@ Expected: FAIL — module `../src/lib/util` not found.
- [ ] **Step 3: Implement `src/lib/util.ts`**
```ts
import type { JsonObject } from "@elgato/utils";
export const DEFAULT_BASE_URL = "http://localhost:9292";
export interface CfgSettings {
export type CfgSettings = {
baseUrl?: string;
apiKey?: string;
}
} & JsonObject;
export interface LlamaSwapConfig {
baseUrl: string;
@@ -1572,6 +1574,9 @@ interface DataSourceItem {
label: string;
value: string;
}
```
Note: `DataSourceItem` must be a `type` alias, not an interface — interfaces without an index signature aren't assignable to `JsonObject`/`JsonValue`, which produces non-fatal TS diagnostics in `sendToPropertyInspector(payload: JsonValue)`. Define it as `type DataSourceItem = { label: string; value: string };` instead (type literals get implicit index signatures).
export function registerDataSources(): void {
streamDeck.ui.onSendToPlugin(async (ev) => {