API 参考类型别名
RebasableTravelsControls<S, P>
Travels 3.0.1. Travels 3 API reference for RebasableTravelsControls.
此页尚未提供中文译文。以下内容由英文源码注释生成,API 名称与签名保持原样。
RebasableTravelsControls<
S,P> =TravelsControls<S,P> &object
Defined in: src/type.ts:455
Type Declaration
rebase()
readonlyrebase: () =>void
Remove all history and make the current state as the new initial state.
Returns
void
Remarks
IMPORTANT: This is a destructive operation. All previous and future history entries are discarded,
and the current state (including any unarchived temp patches) becomes the new baseline (position 0). Any subsequent reset()
calls will return to this new baseline, not the original initial state.
Type Parameters
S
S
P
P extends PatchesOption = { }