# @types/lynx

> TypeScript definitions for lynx

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

## Install

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

## 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.2.3 |
| Published | 2023-11-07 |
| First published | 2023-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.2.3 (latest) — 2023-11-07
- 0.2.1 (ts4.3) — 2023-08-30
- 0.2.2 — 2023-10-18
- 0.2.0 — 2023-08-05

## README

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

import { Socket } from "node:dgram";
import { Transform } from "node:stream";
type HRTime = [number, number];
interface LynxOptions {
    socket?: Socket;
    on_error?: (e: Error) => void;
    scope?: string;
}

interface Timer {
    stat: string;
    sample_rate: number;
    start_time: HRTime;
    stop(): void;
}

interface Stats {
    [stat: string]: string;
}

declare class Lynx extends Transform {
    constructor(host?: string, port?: number, options?: LynxOptions);

    createTimer(stat: string, sample_rate?: number): Timer;
    increment(stats: string | string[], sample_rate?: number): void;
    decrement(stats: string | string[], sample_rate?: number): void;
    count(stats: string | string[], delta: number, sample_rate?: number): void;
    timing(stat: string, duration: number, sample_rate?: number): void;
    set(stat: string, value: number, sample_rate?: number): void;
    gauge(stat: string, value: number, sample_rate?: number): void;
    send(stats: Stats, sample_rate?: number): void;
    close(): void;
}

export = Lynx;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [floy](https://github.com/leftshift).

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