3.0.5 • Published 6 months ago

@types/hapipal__avocat v3.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/hapipal__avocat

Summary

This package contains type definitions for @hapipal/avocat (https://github.com/hapipal/avocat#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapipal__avocat.

index.d.ts

// Type definitions for @hapipal/avocat 3.0
// Project: https://github.com/hapipal/avocat#readme
// Definitions by: Tim Costa <https://github.com/timcosta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { ResponseObject } from '@hapi/hapi';
import { Boom } from '@hapi/boom';

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.

3.0.4

7 months ago

3.0.3

8 months ago

3.0.5

6 months ago

3.0.2

1 year ago

3.0.1

3 years ago

3.0.0

3 years ago