From 3fc7067a28405991fd023df0b944b9736d4448e5 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 1 Sep 2026 18:57:22 +0000 Subject: [PATCH] fix(examples): export CliCommandDefinition so declaration emit can name it The audiobook-curator package build's d.ts generation (rslib environment agent-bundle-index) failed with TS4023 on every exported operations factory: their inferred return types reference CliCommandDefinition, which #150 introduced unexported. Declaration emit must import the type from src/cli-command, so `agent-bundle build` failed with AB5000 ("Error occurred in agent-bundle-index declaration files generation.") while `tsc --noEmit` passed. Reported during examples:check in #166's report. --- examples/audiobook-curator/src/cli-command.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/audiobook-curator/src/cli-command.ts b/examples/audiobook-curator/src/cli-command.ts index 26939ee46..25fd12b1f 100644 --- a/examples/audiobook-curator/src/cli-command.ts +++ b/examples/audiobook-curator/src/cli-command.ts @@ -17,7 +17,14 @@ interface CliProjection { readonly usage: string; } -interface CliCommandDefinition< +/** + * Exported because the operation factories in `src/operations/` export + * objects of `defineCliCommand(...)` results: declaration emit for the + * package build must be able to name this type from those modules + * (TS4023 otherwise fails `agent-bundle build`'s d.ts generation, even + * though `tsc --noEmit` passes). + */ +export interface CliCommandDefinition< InputSchema extends Schema, ResultSchema extends Schema, ParsedInput,