Skip to content

fix issue #1178 and update index.d.ts #1179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,9 @@ export interface Xlsx {
}

// https://c2fo.io/fast-csv/docs/parsing/options

type HeaderArray = (string | undefined | null)[];
type HeaderTransformFunction = (headers: HeaderArray) => HeaderArray;
export interface FastCsvParserOptionsArgs {
objectMode: boolean;
delimiter: string;
Expand All @@ -1331,6 +1334,23 @@ export interface FastCsvParserOptionsArgs {
skipRows: number;
}

interface QuoteColumnMap {
[s: string]: boolean;
}
declare type QuoteColumns = boolean | boolean[] | QuoteColumnMap;

interface RowMap {
[key: string]: any;
}
declare type RowHashArray = [string, any][];
declare type RowArray = string[];
declare type Rows = RowArray | RowMap | RowHashArray;
declare type RowTransformCallback = (error?: Error | null, row?: Rows) => void;
interface RowTransformFunction {
(row: Rows, callback: RowTransformCallback): void;
(row: Rows): Rows;
}

// https://c2fo.io/fast-csv/docs/formatting/options/
export interface FastCsvFormatterOptionsArgs {
objectMode: boolean;
Expand Down