Interface VaultIndex
interface VaultIndex {
addCollection<C extends Collection>(
collection: C,
): VaultCollectionIndex<C>;
getCollections(): Collection[];
getCollectionsWithFile(filePath: string): Collection[];
}
addCollection<C extends Collection>(
collection: C,
): VaultCollectionIndex<C>;
getCollections(): Collection[];
getCollectionsWithFile(filePath: string): Collection[];
}
Index
Methods
addCollection
Register a new Collection into the index. All calls to this function will be treated as adding a brand new collection, regardless of whether the input has already been registered in an earlier call.
Type Parameters
- C extends Collection
Parameters
- collection: C
the collection to register with this index.
Returns VaultCollectionIndex<C>
a VaultCollectionIndex that can be used to interact with the primary index.
getCollections
Returns Collection[]
the list of collections registered with this index.
getCollectionsWithFile
Parameters
- filePath: string
Returns Collection[]
the list of collections that claim to include the given file path.
API for efficiently accessing the notes of a Collection.