@types/split2
Version:
TypeScript definitions for split2
42 lines (31 loc) • 1.4 kB
Markdown
# Installation
> `npm install --save @types/split2`
# Summary
This package contains type definitions for split2 (https://github.com/mcollina/split2).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/split2.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/split2/index.d.ts)
````ts
/// <reference types="node" />
import { Transform, TransformOptions } from "stream";
declare function split(matcher: split.Matcher, Mapper: split.Mapper, options?: split.Options): Transform;
declare function split(mapper: split.Mapper, options?: split.Options): Transform;
// tslint:disable-next-line unified-signatures
declare function split(matcher: split.Matcher, options?: split.Options): Transform;
declare function split(options?: split.Options): Transform;
declare namespace split {
interface Mapper {
(line: string): any;
}
interface Options extends TransformOptions {
maxLength?: number | undefined;
}
type Matcher = string | RegExp | { [Symbol.split](string: string, limit?: number): string[] };
}
export = split;
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [TANAKA Koichi](https://github.com/mugeso).