Files
rose-ash/lib/hyperscript/runtime.sx
giles 781e0d427a HS: type-check : returns the value (not a bool) — +2 typecheck
`'foo' : String` and `'foo' : String!` were returning `true` because
`hs-type-check` was a predicate. Per upstream hyperscript semantics,
`value : Type` is a type-asserted pass-through:
- nil passes the basic check (use `Type!` for non-null)
- mismatched type → raise "Typecheck failed!"
- match → return the original value

`hs-type-check-strict` now also raises on nil rather than returning
false, so the `String!` form actually rejects null.

hs-upstream-expressions/typecheck: 0/5 → 2/5.
asExpression unchanged (uses different `as Type` runtime path).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 11:14:09 +00:00

47 KiB