@sahabaplus/mushaf-engine
Version:
TypeScript implementation of a Quran Mushaf navigation engine
41 lines (40 loc) • 1.24 kB
TypeScript
import { Page } from "./page";
/**
* Representation of a complete Quran Mushaf (printed copy)
*
* This class contains all pages and verses of the Quran with their metadata,
* including information about line positions and page numbers.
*/
export declare class Mushaf {
/**
* Number of lines per page in this Mushaf edition
*/
linesPerPage: number;
/**
* Maximum page number in this Mushaf edition
*/
maxPage: number;
/**
* Collection of all pages in the Mushaf
*/
pages: Page[];
/**
* Create a new Mushaf with the specified parameters
*
* @param linesPerPage - Number of lines on each page in this Mushaf edition
* @param maxPage - Total number of pages in this Mushaf edition
* @param pages - Array containing all pages
*/
constructor(linesPerPage?: number, maxPage?: number, pages?: Page[]);
/**
* Get a page by its number (1-indexed)
*
* @param pageNumber - The page number to retrieve (1-indexed)
* @returns The requested page if it exists, undefined otherwise
*/
getPage(pageNumber: number): Page | undefined;
/**
* Create a string representation of the Mushaf
*/
toString(): string;
}