Successful byte/count inspection or one structured transaction rejection.
Package
@sheetwrite/core
Source
packages/core/src/document-protocol.ts#L46
Variants 2
{ ok: true; operationCount: number; encodedBytes: number }
{
ok: false;
issue: Extract<
MutationIssuetype MutationIssue =
| {
kind: "validation";
severity: "error" | "warning";
ruleId: string;
addr: CellAddress;
value: CellValue;
message: string;
operationIndex: number;
}
| {
kind: "protection";
severity: "error";
protectedRangeId: string;
range: Range;
// … 32 more lines — see the API reference
}typeMutationIssue=| {kind:"validation";severity:"error"|"warning";ruleId:string;addr:CellAddress;value:CellValue;message:string;operationIndex:number;}| {kind:"protection";severity:"error";protectedRangeId:string;range:Range;// … 32 more lines — see the API reference}typeMutationIssue=| {kind:"validation";severity:"error"|"warning";ruleId:string;addr:CellAddress;value:CellValue;message:string;operationIndex:number;}| {kind:"protection";severity:"error";protectedRangeId:string;range:Range;operationIndex:number;message:string;}// … 29 more lines — see the API reference}Structured warning or rejection produced while applying an operation.API reference →,
MutationIssuetype MutationIssue =
| {
kind: "validation";
severity: "error" | "warning";
ruleId: string;
addr: CellAddress;
value: CellValue;
message: string;
operationIndex: number;
}
| {
kind: "protection";
severity: "error";
protectedRangeId: string;
range: Range;
// … 32 more lines — see the API reference
}typeMutationIssue=| {kind:"validation";severity:"error"|"warning";ruleId:string;addr:CellAddress;value:CellValue;message:string;operationIndex:number;}| {kind:"protection";severity:"error";protectedRangeId:string;range:Range;// … 32 more lines — see the API reference}typeMutationIssue=| {kind:"validation";severity:"error"|"warning";ruleId:string;addr:CellAddress;value:CellValue;message:string;operationIndex:number;}| {kind:"protection";severity:"error";protectedRangeId:string;range:Range;operationIndex:number;message:string;}// … 29 more lines — see the API reference}Structured warning or rejection produced while applying an operation.API reference →,