UNPKG

@sigiljs/sigil

Version:

TypeScript-first Node.js HTTP framework offering schema-driven routing, modifier-based middleware, plugin extensibility, and flexible response templating

8 lines (7 loc) 240 B
/** * Exception boundary * * @param fn executable function * @param onError callback that will be executed once exception occurred */ export default function bewareExceptions<T>(fn: () => T, onError?: (reason: any) => void): T | null;