inheritance
extends:
Cell<typeof PartsJson>
items
type IndexedCollection<PartUnion>
readonly
constructor
type new (options: PartsOptions): Parts
options
type PartsOptions
add
Add a part to the collection.
type (json: { id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; ... 7 more ...; content?: string | undefined; } | { ...; }): PartUnion
json
type
{ id?: string | undefined; created?: string | undefined; updated?: string | undefined; name?: string | undefined; start?: number | null | undefined; end?: number | null | undefined; ... 7 more ...; content?: string | undefined; } | { ...; }returns PartUnion
generate_unique_name
Generate a unique name for a part.
type (base_name?: string): string
base_name
type
string default
'new part'returns
stringremove
Remove a part by id.
type (id: string & $brand<"Uuid">): boolean
id
type
string & $brand<"Uuid">returns
booleanfind_part_by_diskfile_path
Find a part that references a specific file path.
type (path: string): PartUnion | undefined
path
type
stringreturns
PartUnion | undefined