@sahabaplus/mushaf-engine
Version:
TypeScript implementation of a Quran Mushaf navigation engine
30 lines (29 loc) • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OverflowResult = void 0;
/**
* Result of a navigation operation that exceeds the boundaries of a page or sura
*
* When navigation goes beyond available lines, this structure captures information
* about the overflow including how many lines exceeded the boundary and which verse
* was reached at the boundary.
*/
class OverflowResult {
/**
* Create a new OverflowResult with specified parameters
*
* @param overflowLines - Number of lines that overflowed beyond the boundary
* @param overflowedVerse - The verse at the boundary where overflow occurred
*/
constructor(overflowLines, overflowedVerse) {
this.overflowLines = overflowLines;
this.overflowedVerse = overflowedVerse;
}
/**
* Create a string representation of the overflow result
*/
toString() {
return `Overflow lines: ${this.overflowLines}, Verse: ${this.overflowedVerse}`;
}
}
exports.OverflowResult = OverflowResult;