import type { AnyObject } from '@naturalcycles/js-lib/types';
export interface CSVWriterConfig {
    /**
     * Default: comma
     */
    delimiter?: string;
    /**
     * Array of columns
     */
    columns?: string[];
    /**
     * Default: true
     */
    includeHeader?: boolean;
}
export declare class CSVWriter {
    constructor(cfg: CSVWriterConfig);
    cfg: CSVWriterConfig & {
        delimiter: string;
    };
    writeRows(rows: AnyObject[]): string;
    writeHeader(): string;
    writeRow(row: AnyObject): string;
    private quoteIfNeeded;
    private quote;
    private shouldQuote;
}
export declare function arrayToCSVString(arr: AnyObject[], cfg?: CSVWriterConfig): string;
/**
 * Iterates over the whole array and notes all possible columns.
 */
export declare function arrayToCSVColumns(arr: AnyObject[]): string[];
