SCAL-325540 Events typings support TS - #623
Open
yinstardev wants to merge 9 commits into
Open
Conversation
commit: |
yinstardev
force-pushed
the
SCAL-325540-events
branch
from
August 25, 2026 08:56
7848d0c to
67988eb
Compare
yinstardev
force-pushed
the
SCAL-325540-events
branch
from
September 3, 2026 05:04
67988eb to
f88b02a
Compare
sastaachar
previously approved these changes
Sep 3, 2026
ruchI9897
reviewed
Sep 3, 2026
sastaachar
previously approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SCAL-325540: Typed trigger() payloads with autocomplete, advance notice for strict typing in 1.54
What
trigger(event, data) now types data against the event's contract via DeepPartial<HostEventRequest> — every field optional at every depth, no index signature. Void events accept {}.
Why
Payload fields now autocomplete inside trigger(HostEvent.X, { … }), and typos / unknown fields / wrong types are caught at compile time with an error that names the field and lists valid ones. Previously the PayloadT | … union let TS infer "anything", which killed autocomplete.
Customer impact (TS only, tsc only — no runtime change)
⚠️ A TS build newly fails only on a field the contract doesn't have (typo or wrong shape), or a wrong type on a known field. Fix is one line.
✅ Omitting fields, {}, correct payloads, and all untyped events — unchanged.
📣 trigger() JSDoc announces strict HostEventRequest (required fields enforced) for SDK 1.54.0 / 26.11.0.cl — two releases of notice. That lands in a separate PR.
Changes
host-event-contracts.ts — DeepPartial, conditional TriggerData
ts-embed.ts, liveboard.ts — apply TriggerData, add notice
contracts.spec.ts — guardrail test pins accept/reject behaviour
events.spec.ts — Search payload made on-contract (the one in-repo break)