TypeScript definitions for map-stream
- Types
- ESM
- CJS
- License
- MIT
- Install Size
- 4.1 kB(2.5 MB)
- Vulns
- 0
- Published
$
npm install @types/map-stream$
pnpm add @types/map-stream$
yarn add @types/map-stream$
bun add @types/map-stream$
deno add npm:@types/map-stream$
vlt install @types/map-stream$
vp add @types/map-stream# Usually installed as a dev dependency
$
npm install -D @types/map-stream$
pnpm add -D @types/map-stream$
yarn add -D @types/map-stream$
bun add -d @types/map-stream$
deno add -D npm:@types/map-stream$
vlt install -D @types/map-stream$
vp add -D @types/map-streamInstallation
npm install --save @types/map-stream
Summary
This package contains type definitions for map-stream (http://github.com/dominictarr/map-stream).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/map-stream.
index.d.ts
/// <reference types="node"/>
import { Stream } from "stream";
export = mapStream;
declare namespace mapStream {
interface Options {
/**
* Continue mapping even if error occured.
*
* On error `map-stream` will emit `failure` event.
*
* @default false
*/
failures?: boolean;
}
interface mapStream extends Stream {
resume(): void;
pause(): void;
destroy(): void;
end(): void;
write(): boolean | never;
}
type Callback = (err: null | Error, data: unknown) => void;
}
declare function mapStream(
mapper: (data: unknown, callback: mapStream.Callback) => void,
opts?: mapStream.Options,
): mapStream.mapStream;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node
Credits
These definitions were written by Konrad Perlicki.