/** * Computes the factorial of a number `n` modulo `mod`. * * @param {number} n - The number for which the factorial is to be computed. * Must be a non-negative integer. * * @param {number} mod - The modulus value. Must be a positive integer. * * @returns {number} - The result of `n! % mod`. * * @throws {Error} - Throws an error if: * - `n` or `mod` are not valid numbers. * - `n` is negative (factorial is not defined for negative numbers). * - `mod` is less than or equal to zero (modulus must be positive). * * @example * ```typescript * import { modFactorial } from './path-to-your-file'; * * console.log(modFactorial(5, 7)); // Output: 3 (since 5! = 120, and 120 % 7 = 3) * console.log(modFactorial(0, 10)); // Output: 1 (since 0! = 1) * ``` */ declare function modFactorial(n: number, mod: number): number; export { modFactorial };