# @types/memwatch-next

> TypeScript definitions for memwatch-next

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

## Install

```sh
npm install @types/memwatch-next
pnpm add @types/memwatch-next
yarn add @types/memwatch-next
bun add @types/memwatch-next
```

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

## Links

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

## Recent versions

- 0.3.6 (latest) — 2023-11-07
- 0.3.3 (ts4.3) — 2023-04-29
- 0.3.2 (ts3.0) — 2020-05-15
- 0.3.1 (ts2.0) — 2016-10-05
- 0.3.5 — 2023-10-18
- 0.3.4 — 2023-09-27

## README

# Installation
> `npm install --save @types/memwatch-next`

# Summary
This package contains type definitions for memwatch-next (https://github.com/marcominetti/node-memwatch).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memwatch-next.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/memwatch-next/index.d.ts)
````ts
declare module "memwatch-next" {
    type EventCallback = (data: LeakInformation | StatsInformation | Object) => void;

    /**
     * Compare the state of your heap between two points in time, telling you what has been allocated, and what has been released.
     */
    export class HeapDiff {
        /**
         * Compute the diff.
         */
        end: () => void;
    }

    /**
     * Stats information.
     * @interface
     */
    export interface StatsInformation {
        current_base: number;
        estimated_base: number;
        heap_compactions: number;
        max: number;
        min: number;
        num_full_gc: number;
        num_inc_gc: number;
        usage_trend: number;
    }

    /**
     * Leak information.
     * @interface
     */
    export interface LeakInformation {
        /**
         * End date.
         */
        end: Date;

        /**
         * Growth.
         */
        growth: number;

        /**
         * Reason leak.
         */
        reason: string;

        /**
         * Start date.
         */
        start: Date;
    }

    /**
     * Subscribe to a event.
     * @param {string} eventName A event name.
     * @param {EventCallback} callback A callback;
     */
    export function on(eventName: string, callback: EventCallback): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Cyril Schumacher](https://github.com/cyrilschumacher).

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