transition(
args
: {lix
:Lix
;to
:Pick
<LixCommit
,"id"
>;version?
:Pick
<{commit_id
:string
;hidden?
:LixGenerated
<undefined
|boolean
>;id
:LixGenerated
<string
>;inherits_from_version_id?
:null
|string
;name
:LixGenerated
<string
>;working_commit_id
:LixGenerated
<string
>; },"id"
>; }):Promise
<{change_set_id
:string
;id
:string
; }>
Transitions a version's state to match the state at toCommitId
.
versionId
is omitted, operates on the active version.toCommitId
, it's a no-op and returns that commit.Parameter | Type |
---|---|
args | { lix : Lix ; to : Pick <LixCommit , "id" >; version? : Pick <{ commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; }, "id" >; } |
args.lix | Lix |
args.to | Pick <LixCommit , "id" > |
args.version? | Pick <{ commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; }, "id" > |
Promise
<{ change_set_id
: string
; id
: string
; }>