Skip to content

Documentation / @etherfold/browser / PortResponse

Type Alias: PortResponse<Case> ​

PortResponse<Case> = object & { ok: true; value: PortResponseValue<Case>; } | { error: PortError; ok: false; }

Defined in: packages/browser/src/host/envelope.ts:820

A host answering, carrying the case it answers as well as the id.

The case is redundant for correlation and is there for the REFUSAL path: a response that could not be built, or could not be cloned, names the surface it belongs to rather than an opaque number.

Type Declaration ​

case ​

readonly case: Case

id ​

readonly id: number

kind ​

readonly kind: "response"

protocol ​

readonly protocol: typeof INDEXER_PORT_PROTOCOL

Type Parameters ​

Case ​

Case extends PortCaseName = PortCaseName