Move core module to root

This commit is contained in:
Johannes Zillmann
2024-03-26 10:50:33 -06:00
parent 7f5f4d7071
commit 0dc47329ef
154 changed files with 9496 additions and 24311 deletions

17
src/TOC.ts Normal file
View File

@ -0,0 +1,17 @@
import Item from './Item';
import ItemType from './ItemType';
/**
* Table of contents usually parsed by `DetectToc.ts`.
*/
export default class TOC {
constructor(public tocHeadlineItems: Item[], public pages: number[], public detectedHeadlineLevels: Set<ItemType>) {}
startPage(): number {
return Math.min(...this.pages);
}
endPage(): number {
return Math.max(...this.pages);
}
}