API 参考函数
validateTravelHistoryEntry()
Travels 3.0.1. Validate a forward and inverse history entry.
此页尚未提供中文译文。以下内容由英文源码注释生成,API 名称与签名保持原样。
validateTravelHistoryEntry<
P>(entry): {error:string; } | {entry:TravelHistoryEntry<P>;error:null; }
Defined in: src/persistence.ts:232
Validate and normalize one externally supplied forward/inverse patch pair.
Accessor-backed or inherited fields are rejected without being evaluated.
Use assertTravelHistoryEntryRecordable() to also apply the detached-value
rules of recordPatches().
Type Parameters
P
P extends object = { }
Parameters
entry
unknown
Returns
{ error: string; } | { entry: TravelHistoryEntry<P>; error: null; }