Skip to content

Commit

Permalink
Specify more specific types for callback parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
adamvoss committed Jul 20, 2017
1 parent 3678dff commit 7595064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ declare namespace fast_csv {

function write(arr: any[], options: FormattingOptions | undefined, ws?: NodeJS.WritableStream): CsvTransformStream;

function writeToBuffer(arr: Buffer, options: FormattingOptions | undefined, cb: ((error: any, next?: any) => void)): void;
function writeToBuffer(arr: Buffer, options: FormattingOptions | undefined, cb: ((error: any, result?: Buffer) => void)): void;

function writeToPath(path: string, arr: any[], options?: FormattingOptions): stream.Writable;

function writeToStream<T extends NodeJS.WritableStream>(ws: T, arr: any[], options?: FormattingOptions): T;

function writeToString(arr: any[], options: FormattingOptions | undefined, cb: ((error: any, next?: any) => void)): void;
function writeToString(arr: any[], options: FormattingOptions | undefined, cb: ((error: any, result?: string) => void)): void;
}

declare class ParserStream extends stream.Transform {
Expand Down

0 comments on commit 7595064

Please sign in to comment.