拓展 / InterractionCallbacks / DeleteDecision
类型别名: DeleteDecision
DeleteDecision =
boolean| {accept:boolean;edges?:Edge[];nodes?:Node[];notes?:Note[];persisted?:boolean; }
定义于:interfaces/InterractionCallbacks.ts:508
由InterractionCallbacks.onBeforeDelete返回的决定。
true 删除整个请求,false 否决它。对象形式(使用accept: true)缩小了删除范围:每个提供的数组都会替换该类型的请求集,并且省略的键将其保留为请求的形式 - 因此{ accept: true }匹配true,而{ accept: true, nodes: [] }不删除任何节点。
类型声明
boolean
{ accept: boolean; edges?: Edge[]; nodes?: Node[]; notes?: Note[]; persisted?: boolean; }
accept
accept:
boolean
edges?
optionaledges:Edge[]
nodes?
optionalnodes:Node[]
notes?
optionalnotes:Note[]
persisted?
optionalpersisted:boolean
消费者将这个删除写入到自己的后端——只有消费者才能知道发生了写入,因此只有消费者才能声明它。历史行被列出并且永远不会反转:撤消不会发出补偿写入,因此恢复这些行将放回真相记录中不再有的内容。