# @types/librato-node

> TypeScript definitions for librato-node

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

## Install

```sh
npm install @types/librato-node
pnpm add @types/librato-node
yarn add @types/librato-node
bun add @types/librato-node
```

## 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 | 5.0.6 |
| Published | 2023-11-07 |
| First published | 2019-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51429 |
| Maintainers | types |

## Links

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

## Recent versions

- 5.0.6 (latest) — 2023-11-07
- 5.0.4 (ts4.3) — 2023-08-30
- 5.0.3 (ts3.6) — 2021-07-08
- 5.0.2 (ts3.0) — 2020-08-13
- 5.0.1 (ts2.8) — 2020-02-06
- 5.0.0 (ts2.3) — 2019-09-16
- 5.0.5 — 2023-10-18

## README

# Installation
> `npm install --save @types/librato-node`

# Summary
This package contains type definitions for librato-node (https://github.com/goodeggs/librato-node).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/librato-node.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/librato-node/index.d.ts)
````ts
export interface CustomSource {
    source: string;
}

export interface LibratoRequestOptions {
    method?: string | undefined;
    uri?: string | undefined;
    headers?: { [index: string]: string } | undefined;
    maxAttempts?: number | undefined;
    retryDelay?: number | undefined;
    delayStrategy?: (() => number) | undefined;
    authorization?: string | undefined;
    "user-agent"?: string | undefined;
}

export interface LibratoConfig {
    email: string;
    token: string;
    prefix?: string | undefined;
    source?: string | undefined;
    requestOptions?: LibratoRequestOptions | undefined;
    period?: number | undefined;
    simulate?: false | undefined;
}

export interface LibratoSimulate {
    simulate: true;
}

export function configure(config: LibratoConfig | LibratoSimulate): void;
export function increment(name: string, value?: number, opts?: CustomSource): void;
export function measure(name: string, value: number, opts?: CustomSource): void;
export function timing(name: string, fn: (done: () => void) => void, cb: (err?: Error | null) => void): void;
export function timing(
    name: string,
    fn: (done: () => void) => void,
    opts?: CustomSource,
    cb?: (err?: Error | null) => void,
): void;
export function timing<T>(
    name: string,
    fn: (done: (err: Error | null | undefined, result: T) => T) => void,
    cb: (err?: Error | null) => void,
): T;
export function timing<T>(
    name: string,
    fn: (done: (err: Error | null | undefined, result: T) => T) => void,
    opts?: CustomSource,
    cb?: (err?: Error | null) => void,
): T;
export function start(): void;
export function stop(cb?: (err?: Error) => void): void;
export function flush(cb?: (err?: Error) => void): void;
export function middleware(config?: {
    requestCountKey?: string | undefined;
    responseTimeKey?: string | undefined;
    statusCodeKey?: string | undefined;
}): (req: object, res: object, next: () => void | Promise<void>) => void;

export function on(event: "error", handler: (err: Error) => void): void;
export function on(event: "SIGINT", handler: () => void): void;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: none

# Credits
These definitions were written by [Jim Geurts](https://github.com/jgeurts).

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