about summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-05-24 20:34:28 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-05-24 20:34:28 +0300
commitec163996772bb0239ebc1beeffe79deb83a17140 (patch)
treee859eafdfb0a19622a2908997df2be42b1bb9813 /lib
parenta578fa50b2fc2d11ff5a0d45c2cd4d390409739a (diff)
downloadthe-epube-ec163996772bb0239ebc1beeffe79deb83a17140.tar.gz
the-epube-ec163996772bb0239ebc1beeffe79deb83a17140.tar.xz
add missing interface for objects returned by find() and fix related problems
Diffstat (limited to 'lib')
-rw-r--r--lib/epub.js/types/section.d.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/epub.js/types/section.d.ts b/lib/epub.js/types/section.d.ts
index 075bef5..9678629 100644
--- a/lib/epub.js/types/section.d.ts
+++ b/lib/epub.js/types/section.d.ts
@@ -24,6 +24,11 @@ export interface SpineItem {
   prev: () => SpineItem,
 }
 
+export interface Match {
+  cfi: string,
+  excerpt: string
+}
+
 export default class Section {
   constructor(item: SpineItem, hooks: HooksObject);
 
@@ -48,7 +53,7 @@ export default class Section {
 
   render(_request?: Function): string;
 
-  find(_query: string): Array<Element>;
+  find(_query: string): Array<Match>;
 
   reconcileLayoutSettings(globalLayout: GlobalLayout): LayoutSettings;