0.4.16 • Published 6 months ago

@types/hapi-decorators v0.4.16

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

Installation

npm install --save @types/hapi-decorators

Summary

This package contains type definitions for hapi-decorators (https://github.com/knownasilya/hapi-decorators).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi-decorators.

index.d.ts

// Type definitions for hapi-decorators v0.4.3
// Project: https://github.com/knownasilya/hapi-decorators
// Definitions by: Ken Howard <https://github.com/kenhowardpdx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as hapi from 'hapi';
import * as Joi from 'joi';
interface ControllerStatic {
    new (...args: any[]): Controller;
}
export interface Controller {
    baseUrl: string;
    routes: () => hapi.RouteConfiguration[];
}
export function controller(baseUrl: string): (target: ControllerStatic) => void;
interface IRouteSetup {
    (target: any, key: any, descriptor: any): any;
}
interface IRouteDecorator {
    (method: string, path: string): IRouteSetup;
}
interface IRouteConfig {
    (path: string): IRouteSetup;
}
export const route: IRouteDecorator;
export const get: IRouteConfig;
export const post: IRouteConfig;
export const put: IRouteConfig;
// export const delete: IRouteConfig;
export const patch: IRouteConfig;
export const all: IRouteConfig;
export function config(config: hapi.RouteAdditionalConfigurationOptions): (target: any, key: any, descriptor: any) => any;

export function validate(config: hapi.RouteValidationConfigurationObject): (target: any, key: any, descriptor: any) => any;
interface ICacheConfig {
    privacy?: string | undefined;
    expiresIn?: number | undefined;
    expiresAt?: number | undefined;
}
export function cache(cacheConfig: ICacheConfig): (target: any, key: any, descriptor: any) => any;
export function pre(pre: {
    [key: string]: any;
}): (target: any, key: any, descriptor: any) => any;

Additional Details

Credits

These definitions were written by Ken Howard.

0.4.15

7 months ago

0.4.16

6 months ago

0.4.14

8 months ago

0.4.13

3 years ago

0.4.12

3 years ago

0.4.11

6 years ago

0.4.10

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

8 years ago

0.4.1

8 years ago