vaultmd / CommitEvent
Type Alias: CommitEvent
CommitEvent = {
content:string;op:"create"|"update";path:string; } | {op:"delete";path:string; }
Defined in: src/locked-file/models/commit-event.ts:6
Event emitted to the onCommit callback after each successful file operation. The union discriminates on op: write operations carry the new file content; delete operations do not.
Union Members
Type Literal
{ content: string; op: "create" | "update"; path: string; }
content
content:
string
The new UTF-8 file content after the write.
op
op:
"create"|"update"
The operation kind: 'create' on first write, 'update' on subsequent writes.
path
path:
string
Vault-relative path of the affected file.
Type Literal
{ op: "delete"; path: string; }
op
op:
"delete"
The operation kind for deletions.
path
path:
string
Vault-relative path of the deleted file.