Fixed export default issue.

This commit is contained in:
Frank Brullo
2019-04-05 10:30:33 -04:00
parent c0ce9015af
commit ba8ea8de1a
2 changed files with 12 additions and 11 deletions

View File

@@ -1,16 +1,17 @@
// Type definitions for save-csv 4.1.0
// Type definitions for save-csv 4.1
// Project: https://github.com/silverwind/save-csv
// Definitions by: Frank Brullo <https://github.com/FrankBrullo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
interface SaveCsvProps {
filename: string,
sep?: string,
eol?: string,
quote?: string,
bom?: boolean,
mime?: string,
formatter?: (value: string | JSON) => void
export interface SaveCsvProps {
filename: string;
sep?: string;
eol?: string;
quote?: string;
bom?: boolean;
mime?: string;
formatter?: (value: string | JSON) => void;
}
export default function saveCsv (array: ReadonlyArray<any>, options?: SaveCsvProps): void;
export function saveCsv(array: ReadonlyArray<any>, options?: SaveCsvProps): void;

View File

@@ -1,4 +1,4 @@
import saveCsv from 'save-csv';
import { saveCsv } from 'save-csv';
saveCsv([
{a: 1, b: 2},