docs: restore plan code fence balance after datasource note

This commit is contained in:
2026-08-14 10:49:06 -06:00
parent f45b29fcaf
commit 325722f072
@@ -1570,13 +1570,7 @@ import { fetchMetrics, fetchModels } from "./llamaswap";
import { gpuInfos, parseGpuMetrics } from "./metrics-parser"; import { gpuInfos, parseGpuMetrics } from "./metrics-parser";
import { cfgFromSettings, type CfgSettings } from "./util"; import { cfgFromSettings, type CfgSettings } from "./util";
interface DataSourceItem { type DataSourceItem = { label: string; value: string };
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 { export function registerDataSources(): void {
streamDeck.ui.onSendToPlugin(async (ev) => { streamDeck.ui.onSendToPlugin(async (ev) => {
@@ -1618,7 +1612,7 @@ export function registerDataSources(): void {
- [ ] **Step 3: Verify it typechecks** - [ ] **Step 3: Verify it typechecks**
Run: `npm run build` Run: `npm run build`
Expected: build succeeds. (Note: `import streamDeck` default export + `streamDeck.ui.onSendToPlugin` — if the compiler reports a different method name, consult `node_modules/@elgato/streamdeck/dist/plugin/ui.d.ts` and adjust; the public API is `onSendToPlugin` / `sendToPropertyInspector`.) Expected: build succeeds. (Note: `import streamDeck` default export + `streamDeck.ui.onSendToPlugin` — if the compiler reports a different method name, consult `node_modules/@elgato/streamdeck/dist/plugin/ui.d.ts` and adjust; the public API is `onSendToPlugin` / `sendToPropertyInspector`. Also note: `DataSourceItem` must be a `type` alias, not an interface — interfaces without an index signature aren't assignable to `JsonObject`/`JsonValue`.)
- [ ] **Step 4: Commit** - [ ] **Step 4: Commit**