interface MockView No documentation.
Properties
route
readonly route: string; The route prefix, such as counter or content1.
revision
readonly revision: number; The revision of the current state.
interactionHandlers
readonly interactionHandlers: readonly string[]; Interaction names that a mounted client currently handles.
Methods
update
update(patch: MockState | ((state: MockState) => MockState)): void; Merges a patch, advances the revision and pushes the state like a .NET publication.
push
push(frame: Record<string, unknown>): void; Pushes a raw frame to the client, such as a stale or malformed state.
pushFailure
pushFailure(failure: {
readonly kind?: BridgeErrorKind;
readonly message: string;
readonly detail?: BridgeFailureDetail;
}): void; Pushes a failure notice: .NET cannot publish this route for now, so the client keeps its last state and reports the error.
batch
batch(edit: () => void): void; Pushes the collection edits made by edit as one delta frame.
operations
operations(member?: string): readonly MockOperation[]; Operations started on this View, oldest first, optionally of one command member.
interact
interact(name: string, input: unknown, options?: MockInteractionOptions): Promise<MockInteractionReply>; Sends an interaction request to the client's handler, as .NET does.