Skip to content

Commit 77142e3

Browse files
committed
test(#15662): give the { source: 1 } capture an explicit return type
TS7030 — the IIFE had a fall-through path with no return. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
1 parent 59ab3a5 commit 77142e3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/services/service-automation/src/structural-condition-shape.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ describe('#15662 — a structural condition that is neither text nor an expressi
103103
// Before the fix this reached `exprStr.trim()` and threw
104104
// `TypeError: source.trim is not a function` out of the validator — a
105105
// refusal by accident, with no location and no rule.
106-
const thrown = (() => { try { register(flowWith({ decisionCondition: { source: 1 } }))(); } catch (e) { return e as Error; } })();
106+
const thrown = ((): Error | undefined => {
107+
try { register(flowWith({ decisionCondition: { source: 1 } }))(); } catch (e) { return e as Error; }
108+
return undefined;
109+
})();
107110
expect(thrown).toBeDefined();
108111
expect(thrown!.message).toContain(STRUCTURAL_CONDITION_SHAPE_REFUSAL);
109112
expect(thrown!.message).not.toContain('is not a function');

0 commit comments

Comments
 (0)