Installation
npm install --save @types/avocat
Summary
This package contains type definitions for avocat (https://github.com/hapipal/avocat#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/avocat.
index.d.ts
import { Boom } from "@hapi/boom";
import { ResponseObject } from "@hapi/hapi";
export interface Options {
return?: boolean | undefined;
includeMessage?: boolean | undefined;
}
// the return type has to be any because the following scenarios exist:
// 1. options.return = false - this will always throw or return false
// 2. options.return = true - this will either return false or a Boom type
// Due to scenario 2 and that behavior changes based on options, a return
// type of any is the only way I see this working
export function rethrow(err: ResponseObject | Boom, options?: Options): any;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: @hapi/boom, @hapi/hapi, @types/node, joi
Credits
These definitions were written by Tim Costa.