# @types/hapi__call

> TypeScript definitions for @hapi/call

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

## Install

```sh
npm install @types/hapi__call
pnpm add @types/hapi__call
yarn add @types/hapi__call
bun add @types/hapi__call
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 9.0.3 |
| Published | 2023-11-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51430 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 9.0.3 (latest) — 2023-11-07
- 9.0.0 (ts3.9) — 2022-06-07
- 8.0.2 (ts3.2) — 2020-09-26
- 8.0.1 (ts2.8) — 2020-04-15
- 9.0.2 — 2023-10-18
- 9.0.1 — 2023-09-16
- 8.0.0 — 2020-04-07

## README

# Installation
> `npm install --save @types/hapi__call`

# Summary
This package contains type definitions for @hapi/call (https://github.com/hapijs/call#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi__call.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi__call/index.d.ts)
````ts
/// <reference types="node" />

export interface RouteDefinition {
    /**
     * Generally this is an HTTP method or "*" to mean any.
     * This field is case insensitive.
     *
     * - "get"
     * - "head"
     * - "post"
     * - "put"
     * - "delete"
     * - "connect"
     * - "options"
     * - "trace"
     * - "patch"
     */
    method: string;
    path: string;
}

export interface RouterOptions {
    isCaseSensitive: boolean;
}

export interface Match<Handler> {
    params: Partial<Record<string, string>>;
    paramsArray: string[];
    route: Handler;
}

export type Route<Handler> = Match<Handler> | Error;

export class Router<Handler> {
    constructor(routerOptions?: RouterOptions);
    add(definition: RouteDefinition, route?: Handler): void;
    route(method: string, path: string): Route<Handler>;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Rodrigo Saboya](https://github.com/saboya), and [Sebastian Malton](https://github.com/nokel81).

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