Successful byte/count inspection or one structured transaction rejection.
Package
@sheetwrite/core
Source
packages/core/src/document-protocol.ts#L26
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;
// … 16 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;// … 16 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;}// … 13 more lines — see the API reference}Structured warning or rejection produced while applying an operation.API reference →, { kind: "resource-limit" }>;
}
Declaration
View full TypeScript declaration
exporttypeTransactionResourceValidationResult=
| {
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;
// … 16 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;// … 16 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;}// … 13 more lines — see the API reference}Structured warning or rejection produced while applying an operation.API reference →,