npm.io
1.0.0 • Published 1 year ago

@types/stream-meter

Licence
MIT
Version
1.0.0
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/stream-meter

Summary

This package contains type definitions for stream-meter (https://github.com/brycebaril/node-stream-meter).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-meter.

index.d.ts

/// <reference types="node" />

import { Transform } from "stream";

declare namespace m {
    interface StreamMeterConstruct {
        (
            /**
             * Size (in bytes) to trigger the stream to abort.
             * It will complete whatever frame it aborted in, so the size streamed
             * will still be >= size but no more than size + highWaterMark
             * @default Number.MAX_VALUE
             */
            maxBytes?: number,
        ): StreamMeter;

        new(
            /**
             * Size (in bytes) to trigger the stream to abort.
             * It will complete whatever frame it aborted in, so the size streamed
             * will still be >= size but no more than size + highWaterMark
             * @default Number.MAX_VALUE
             */
            maxBytes?: number,
        ): StreamMeter;
    }

    interface StreamMeter extends Transform {
        /**
         * Number of bytes handled and passed through the meter.
         */
        bytes: number;

        /**
         * Size (in bytes) to trigger the stream to abort.
         * It will complete whatever frame it aborted in, so the size streamed
         * will still be >= size but no more than size + highWaterMark
         * @default Number.MAX_VALUE
         */
        maxBytes: number;
    }
}

declare const m: m.StreamMeterConstruct;

export = m;

Additional Details

  • Last updated: Wed, 23 Oct 2024 0218 GMT
  • Dependencies: @types/node

Credits

These definitions were written by TANAKA Koichi.