locateResource()
const consolidatedResource$ = reader.locateResource(resource, options)Reference
type CfiLocatableResource = {
cfi: string
}
type ProseParsedCfi {
// This will always be set and is statically infered from the CFI format.
// This does not means the range is valid.
isCfiRange: boolean
itemIndex?: number
}
export type LocatableResource = SpineItem | CfiLocatableResource
export type ConsolidatedResource = CfiLocatableResource & ProseParsedCfi & {
itemPageIndex?: number
absolutePageIndex?: number
startNode?: Node
startOffset?: number
// This is the resolved range if there is one and if it's resolvable.
// Meaning, a valid range for this book item
range?: Range
}
locateResource(resource, options)Parameters
Returns
Last updated