UNPKG

@types/stream-meter

Version:
66 lines (53 loc) 2.04 kB
# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stream-meter/index.d.ts) ````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 02:32:18 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [TANAKA Koichi](https://github.com/mugeso).