npm.io
6.1.9 • Published 2 years ago

@types/hapi__glue

Licence
MIT
Version
6.1.9
Deps
3
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/hapi__glue

Summary

This package contains type definitions for @hapi/glue (https://github.com/hapijs/glue).

Details

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

index.d.ts

import { Plugin, Server, ServerOptions } from "@hapi/hapi";

export interface Options {
    relativeTo: string;
    preConnections?: ((Server: Server, next: (err: any) => void) => void) | undefined;
    preRegister?: ((Server: Server, next: (err: any) => void) => void) | undefined;
}

export interface PluginObject {
    plugin: string | Plugin<any>;
    options?: any;
    routes?: any;
}

export interface Manifest {
    server: ServerOptions;
    register?: {
        plugins: string[] | PluginObject[] | Array<(string | PluginObject)>;
    } | undefined;
}

export function compose(manifest: Manifest, options?: Options): Promise<Server>;

Additional Details

Credits

These definitions were written by Silas Rech, and Avery Fay.