Repository navigation
Commit d3c1071
committed
fix(spec): declare what the expression author helpers actually emit
`expression()` and `cel()` (hence `F` and `P`) always set a non-blank
`source`, but were declared as returning `Expression`, whose `source` is
optional. Harmless while no slot required `source`; once the field-rule triad
did, a `P` template written straight into `visibleWhen` became a TS2322 — the
recommended authoring form for a predicate stopped type-checking in the one
place predicates are written (caught by `check:skill-examples` on the docs and
skills corpus, and by the examples typecheck on app-showcase).
Fixed at the producer, not the call sites: the return type now states what the
helper emits. Narrowing a return type removes nothing from a caller —
`EvaluatedExpression` is assignable to `Expression`.
Claude-Session: https://claude.ai/code/session_019srGWGCBBCBHqcDoRZpQRh
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4f9d0cf commit d3c1071
1 file changed
Lines changed: 21 additions & 3 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
| |||
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
511 | | - | |
512 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
513 | 531 | | |
514 | 532 | | |
515 | 533 | | |
| |||
0 commit comments