@types/stream-meter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

/// <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 02:32:18 GMT
  • Dependencies: @types/node

Credits

These definitions were written by TANAKA Koichi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/stream-meter

Weekly Downloads

3,535

Version

1.0.0

License

MIT

Unpacked Size

5.42 kB

Total Files

5

Last publish

Collaborators

  • types