@types/avocat
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

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

Credits

These definitions were written by Tim Costa.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/avocat

Weekly Downloads

2

Version

2.0.5

License

MIT

Unpacked Size

4.03 kB

Total Files

5

Last publish

Collaborators

  • types