chore: restore null! placeholders for forward-reference pattern (#1284)

Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
jnjpng
2026-03-05 17:12:20 -08:00
committed by GitHub
parent 5a6d804069
commit cdf7167b26
2 changed files with 6 additions and 11 deletions

View File

@@ -73,18 +73,13 @@ export function createCommandRunner({
onCommandFinished,
}: RunnerDeps) {
function getHandle(id: string, input: string): CommandHandle {
// biome-ignore lint/style/noNonNullAssertion: forward-reference pattern — overwritten synchronously below. null! preferred over no-ops to crash loudly if invariant breaks.
const handle: CommandHandle = {
id,
input,
// Placeholders are overwritten below before the handle is returned.
update: (_update: CommandUpdate) => {},
finish: (
_output: string,
_success?: boolean,
_dimOutput?: boolean,
_preformatted?: boolean,
) => {},
fail: (_output: string) => {},
update: null!,
finish: null!,
fail: null!,
};
const update = (updateData: CommandUpdate) => {