@sheetwrite/coretype
State transition emitted by the comment coordinator.
- Package
@sheetwrite/core- Source
packages/core/src/collaboration.ts#L490
Variants 5
{ type: "loaded"; version: number; threads: readonly CommentThreadinterface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}Versioned discussion anchored to a document location.API reference →[];}{ type: "changed"; version: number; thread: CommentThreadinterface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}Versioned discussion anchored to a document location.API reference → }{ type: "conflict"; currentVersion: number }{ type: "gap"; expectedVersion: number; receivedVersion: number;}{ type: "error"; error: SheetwriteErrorclass SheetwriteError
extends Error
implements SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
// … 73 more lines — see the API reference
}class SheetwriteError
extends Error
implements SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
// … 73 more lines — see the API reference
}class SheetwriteError
extends Error
implements
SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
| "datasource-request-failed"
| "renderer-fallback"
| "export-failed"
// … 75 more lines — see the API reference
}Canonical envelope for thrown and callback-delivered Sheetwrite failures.API reference → }Declaration
View full TypeScript declaration
export type CommentCoordinatorEvent = | { type: "loaded"; version: number; threads: readonly CommentThreadinterface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}Versioned discussion anchored to a document location.API reference →[]; } | { type: "changed"; version: number; thread: CommentThreadinterface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}interface CommentThread {
id: string;
documentId: string;
anchor: CommentAnchor;
version: number;
messages: readonly CommentMessage[];
resolved: boolean;
resolvedBy?: CommentAuthorRef;
resolvedAt?: string;
}Versioned discussion anchored to a document location.API reference →; } | { type: "conflict"; currentVersion: number; } | { type: "gap"; expectedVersion: number; receivedVersion: number; } | { type: "error"; error: SheetwriteErrorclass SheetwriteError
extends Error
implements SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
// … 73 more lines — see the API reference
}class SheetwriteError
extends Error
implements SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
// … 73 more lines — see the API reference
}class SheetwriteError
extends Error
implements
SheetwriteErrorEnvelope
{
constructor(
code: SheetwriteErrorCode,
operation: SheetwriteErrorOperation,
message: string,
options?: SheetwriteErrorOptions,
);
code:
| "aborted"
| "blocked"
| "initialization-failed"
| "initialization-required"
| "datasource-request-failed"
| "renderer-fallback"
| "export-failed"
// … 75 more lines — see the API reference
}Canonical envelope for thrown and callback-delivered Sheetwrite failures.API reference →; };