@httpland/nel-middleware
Version:
HTTP network error logging(NEL) middleware
10 lines (9 loc) • 502 B
TypeScript
import type { NELPolicy } from "./types.js";
/** Assert the {@link NELPolicy} is valid.
* @throws {Error} If the policy include invalid field.
*/
export declare function assertValidNELPolicy(policy: NELPolicy): asserts policy;
/** Assert the input is non-negative integer. */
export declare function assertNonNegativeInteger(input: number, msg?: string): asserts input;
/** Assert the input is unit interval. */
export declare function assertUnitInterval(input: number, msg?: string): asserts input;