MessageTarget
Defined in: packages/core/src/message/target.ts:55
What a platform target must provide to the shared message lifecycle.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”Message
Section titled “Message”Message
Snapshot
Section titled “Snapshot”Snapshot
Properties
Section titled “Properties”pause?
Section titled “pause?”
readonlyoptionalpause?: () =>void
Defined in: packages/core/src/message/target.ts:70
Stops draining queued snapshots until resume.
Returns
Section titled “Returns”void
readonlyready:Effect<Message,MessageTargetError>
Defined in: packages/core/src/message/target.ts:57
The first platform message, once it has been created.
resume?
Section titled “resume?”
readonlyoptionalresume?: () =>void
Defined in: packages/core/src/message/target.ts:72
Resumes draining the newest queued snapshot.
Returns
Section titled “Returns”void
readonlyrun:Effect<never>
Defined in: packages/core/src/message/target.ts:62
Drains queued snapshots while the target is open. The effect stays alive
after close() so the owning mount scope controls when it ends.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: packages/core/src/message/target.ts:68
Stops future sends and fails ready if no message was created yet.
Returns
Section titled “Returns”void
fail()
Section titled “fail()”fail(
error):void
Defined in: packages/core/src/message/target.ts:66
Fails the in-flight attempt when the host cannot produce a snapshot.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
queue()
Section titled “queue()”queue(
snapshot):void
Defined in: packages/core/src/message/target.ts:64
Enqueues the newest snapshot. Safe to call from a host commit.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”Snapshot
Returns
Section titled “Returns”void