# @types/hapi-decorators

> TypeScript definitions for hapi-decorators

Latest version **0.4.16** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/hapi-decorators
pnpm add @types/hapi-decorators
yarn add @types/hapi-decorators
bun add @types/hapi-decorators
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.16 |
| Published | 2023-11-07 |
| First published | 2016-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/hapi-decorators
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi-decorators
- npm.io page: https://npm.io/package/@types/hapi-decorators

## Dependencies (2)

- [joi](https://npm.io/package/joi.md) ^17.3.0
- [@types/hapi](https://npm.io/package/@types/hapi.md) ^16

## Recent versions

- 0.4.16 (latest) — 2023-11-07
- 0.4.13 (ts3.6) — 2021-07-08
- 0.4.12 (ts3.4) — 2021-01-14
- 0.4.11 (ts2.8) — 2018-10-22
- 0.4.10 (ts2.4) — 2018-02-26
- 0.4.6 (ts2.3) — 2017-08-21
- 0.4.4 (ts2.0) — 2017-05-15
- 0.4.15 — 2023-10-18
- 0.4.14 — 2023-09-16
- 0.4.9 — 2018-02-10
- 0.4.8 — 2018-01-03
- 0.4.7 — 2017-11-09
- 0.4.5 — 2017-06-07
- 0.4.3 — 2017-02-13
- 0.4.2 — 2016-10-26
- … 1 more at https://npm.io/package/@types/hapi-decorators/versions

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi-decorators/index.d.ts)
````ts
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
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/hapi](https://npmjs.com/package/@types/hapi), [joi](https://npmjs.com/package/joi)

# Credits
These definitions were written by [Ken Howard](https://github.com/kenhowardpdx).

---
_Source: https://npm.io/package/@types/hapi-decorators · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
