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

0.0.37 • Public • Published

Installation

npm install --save @types/line-reader

Summary

This package contains type definitions for line-reader (https://github.com/nickewing/line-reader).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/line-reader.

index.d.ts

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

interface LineReaderOptions {
    separator?: any;
    encoding?: string | undefined;
    bufferSize?: number | undefined;
}

interface Reader {
    hasNextLine(): boolean;
    nextLine(cb: (err: Error, line?: string) => void): void;
    close(cb: (err: Error) => void): void;
    isOpen(): boolean;
    isClosed(): boolean;
    getReadStream(): NodeJS.ReadableStream;
}

interface LineReader {
    open(): Function;
    open(
        file: string | NodeJS.ReadableStream,
        options: LineReaderOptions,
        cb: (err: Error, reader: Reader) => void,
    ): void;
    open(file: string | NodeJS.ReadableStream, cb: (err: Error, reader: Reader) => void): void;

    eachLine(): Function; // For Promise.promisify;
    eachLine(
        file: string | NodeJS.ReadableStream,
        options: LineReaderOptions,
        cb: (line: string, last: boolean, continueCb?: Function) => void,
        errCb?: (err?: Error) => void,
    ): LineReader;
    eachLine(
        file: string | NodeJS.ReadableStream,
        cb: (line: string, last: boolean, continueCb?: Function) => void,
        errCb?: (err?: Error) => void,
    ): LineReader;
}

declare module "line-reader" {
    var lr: LineReader;
    export = lr;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Sam Saint-Pettersen.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.373,236ts5.7
0.0.373,236ts5.6
0.0.373,236latest
0.0.373,236ts4.5
0.0.373,236ts4.6
0.0.373,236ts4.7
0.0.373,236ts4.8
0.0.373,236ts4.9
0.0.373,236ts5.0
0.0.373,236ts5.1
0.0.373,236ts5.2
0.0.373,236ts5.3
0.0.373,236ts5.4
0.0.373,236ts5.5
0.0.373,236ts5.8
0.0.34651ts3.6
0.0.34651ts3.7
0.0.34651ts3.8
0.0.34651ts3.9
0.0.34651ts4.0
0.0.34651ts4.1
0.0.34651ts4.2
0.0.28296ts2.0
0.0.28296ts2.1
0.0.28296ts2.2
0.0.28296ts2.3
0.0.28296ts2.4
0.0.28296ts2.5
0.0.28296ts2.6
0.0.28296ts2.7
0.0.28296ts2.8
0.0.28296ts2.9
0.0.3510ts4.3
0.0.3510ts4.4
0.0.302ts3.0
0.0.302ts3.1
0.0.302ts3.2
0.0.310ts3.3
0.0.3325ts3.4
0.0.3325ts3.5

Version History

VersionDownloads (Last 7 Days)Published
0.0.373,236
0.0.36802
0.0.3510
0.0.34651
0.0.3325
0.0.320
0.0.310
0.0.302
0.0.2967
0.0.28296
0.0.270
0.0.26-alpha0
0.0.25-alpha0
0.0.24-alpha0
0.0.23-alpha0
0.0.22-alpha0
0.0.21-alpha0
0.0.20-alpha0
0.0.15-alpha0
0.0.14-alpha0

Package Sidebar

Install

npm i @types/line-reader

Weekly Downloads

5,089

Version

0.0.37

License

MIT

Unpacked Size

5.16 kB

Total Files

5

Last publish

Collaborators

  • types