@yedoma-labs/ysyr-import 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +235 -2
- package/dist/index.cjs +527 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +176 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.js +517 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -5
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule for one column. `parse` receives the raw cell text and returns the typed value or throws.
|
|
3
|
+
* The thrown error's message is reported as a `PARSE` row error.
|
|
4
|
+
*/
|
|
5
|
+
interface ColumnRule<T = unknown, R extends boolean = boolean> {
|
|
6
|
+
/** Empty cells are a `REQUIRED` error. Optional columns yield `undefined` for empty cells. */
|
|
7
|
+
readonly required?: R;
|
|
8
|
+
readonly parse: (raw: string) => T;
|
|
9
|
+
}
|
|
10
|
+
interface ColumnOptions<R extends boolean = boolean> {
|
|
11
|
+
readonly required?: R;
|
|
12
|
+
}
|
|
13
|
+
/** Column name to rule. */
|
|
14
|
+
type Schema = Readonly<Record<string, ColumnRule<unknown, boolean>>>;
|
|
15
|
+
type ValueOf<R> = R extends {
|
|
16
|
+
readonly parse: (raw: string) => infer T;
|
|
17
|
+
} ? T : never;
|
|
18
|
+
type IsRequired<R> = R extends {
|
|
19
|
+
readonly required?: infer Q;
|
|
20
|
+
} ? [NonNullable<Q>] extends [true] ? true : false : false;
|
|
21
|
+
/** Row type produced by a schema: required columns are `T`, optional columns `T | undefined`. */
|
|
22
|
+
type InferRow<S extends Schema> = { -readonly [K in keyof S]: IsRequired<S[K]> extends true ? ValueOf<S[K]> : ValueOf<S[K]> | undefined; };
|
|
23
|
+
/** Trimmed text. */
|
|
24
|
+
export declare function string<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<string, R>;
|
|
25
|
+
/** Whole number within the safe integer range, e.g. `-42` or `+7`. */
|
|
26
|
+
export declare function int<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<number, R>;
|
|
27
|
+
/** Finite decimal number with `.` as decimal separator, e.g. `12`, `-0.5`, `1e3`. */
|
|
28
|
+
export declare function number<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<number, R>;
|
|
29
|
+
/** Accepts `true`, `false`, `1` or `0` (case-insensitive). */
|
|
30
|
+
export declare function boolean<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<boolean, R>;
|
|
31
|
+
/** ISO-8601 calendar date `YYYY-MM-DD`, returned as a `Date` at UTC midnight. */
|
|
32
|
+
export declare function date<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<Date, R>;
|
|
33
|
+
/**
|
|
34
|
+
* One of the given values, compared case-sensitively after trimming.
|
|
35
|
+
* Named `enumOf` because `enum` is a reserved word in JavaScript.
|
|
36
|
+
*/
|
|
37
|
+
export declare function enumOf<const V extends readonly string[], const R extends boolean = false>(values: V, options?: ColumnOptions<R>): ColumnRule<V[number], R>;
|
|
38
|
+
/** One data record as produced by the parser. */
|
|
39
|
+
interface CsvRecord {
|
|
40
|
+
/** Data row number, starting at 1. The header line is not counted. Blank lines are skipped. */
|
|
41
|
+
readonly row: number;
|
|
42
|
+
/** Physical line on which the record starts, starting at 1. */
|
|
43
|
+
readonly line: number;
|
|
44
|
+
/** Raw field values in column order. */
|
|
45
|
+
readonly values: readonly string[];
|
|
46
|
+
/**
|
|
47
|
+
* Set when the record has broken quoting (unterminated quoted field at end of input, or
|
|
48
|
+
* characters after a closing quote). `values` then holds a best-effort recovery.
|
|
49
|
+
*/
|
|
50
|
+
readonly quoteError?: string;
|
|
51
|
+
}
|
|
52
|
+
interface LimitOptions {
|
|
53
|
+
/** Maximum input size in UTF-8 bytes. Default 10 MiB. */
|
|
54
|
+
readonly maxBytes?: number;
|
|
55
|
+
/** Maximum number of data rows. Default 100000. */
|
|
56
|
+
readonly maxRows?: number;
|
|
57
|
+
/** Maximum length of a single field in UTF-16 code units. Default 10000. */
|
|
58
|
+
readonly maxFieldLength?: number;
|
|
59
|
+
}
|
|
60
|
+
interface ParseCsvOptions extends LimitOptions {
|
|
61
|
+
/** Field delimiter, a single character. Default ",". */
|
|
62
|
+
readonly delimiter?: string;
|
|
63
|
+
/** Detect the delimiter among `,` `;` and tab from the first line. Off by default. */
|
|
64
|
+
readonly autoDetectDelimiter?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* `true` (default): the first record is the header line.
|
|
67
|
+
* An array: the input has no header line and these are the column names.
|
|
68
|
+
*/
|
|
69
|
+
readonly header?: true | readonly string[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Parses CSV text into data records (RFC 4180 quoting, `\n`, `\r\n` and `\r` line endings,
|
|
73
|
+
* UTF-8 BOM removed). The header line is consumed and not returned.
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseCsvRecords(text: string, options?: ParseCsvOptions): CsvRecord[];
|
|
76
|
+
/** Whole-file error codes. Row-level problems are reported as `RowError`, never thrown. */
|
|
77
|
+
type ImportErrorCode = "MISSING_COLUMN" | "LIMIT_EXCEEDED" | "INVALID_HEADER";
|
|
78
|
+
/** Input limits that can be exceeded. */
|
|
79
|
+
type LimitName = "maxBytes" | "maxRows" | "maxFieldLength";
|
|
80
|
+
interface ImportErrorDetails {
|
|
81
|
+
/** MISSING_COLUMN: names of the required columns that are absent from the header. */
|
|
82
|
+
readonly columns?: readonly string[];
|
|
83
|
+
/** LIMIT_EXCEEDED: the limit that was exceeded. */
|
|
84
|
+
readonly limit?: LimitName;
|
|
85
|
+
/** LIMIT_EXCEEDED: the configured maximum. */
|
|
86
|
+
readonly max?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Typed error that aborts the whole import. Thrown for a missing required column,
|
|
90
|
+
* for exceeded input limits, and for a header line with broken quoting.
|
|
91
|
+
*/
|
|
92
|
+
export declare class ImportError extends Error {
|
|
93
|
+
readonly code: ImportErrorCode;
|
|
94
|
+
readonly columns: readonly string[];
|
|
95
|
+
readonly limit: LimitName | undefined;
|
|
96
|
+
readonly max: number | undefined;
|
|
97
|
+
constructor(code: ImportErrorCode, message: string, details?: ImportErrorDetails);
|
|
98
|
+
}
|
|
99
|
+
type RowErrorCode = "REQUIRED" | "PARSE" | "VALIDATION" | "UNKNOWN_COLUMN" | "WRONG_FIELD_COUNT" | "PARSE_QUOTE";
|
|
100
|
+
/**
|
|
101
|
+
* One problem found in one data row. A row can produce several errors (one per column).
|
|
102
|
+
* `message` is at most 100 characters and contains no control characters or raw input dumps.
|
|
103
|
+
*/
|
|
104
|
+
interface RowError {
|
|
105
|
+
/** Data row number, starting at 1. The header line is not counted. */
|
|
106
|
+
readonly row: number;
|
|
107
|
+
/** Physical line on which the record starts, starting at 1. */
|
|
108
|
+
readonly line: number;
|
|
109
|
+
readonly column?: string;
|
|
110
|
+
readonly code: RowErrorCode;
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}
|
|
113
|
+
interface ImportSummary {
|
|
114
|
+
/** Number of data rows in the input. */
|
|
115
|
+
readonly total: number;
|
|
116
|
+
/** Number of accepted rows. */
|
|
117
|
+
readonly accepted: number;
|
|
118
|
+
/** Number of distinct rejected rows. The `rejected` list can hold more entries (one per error). */
|
|
119
|
+
readonly rejected: number;
|
|
120
|
+
}
|
|
121
|
+
/** Per-row result passed to the `onRow` callback, in input order. */
|
|
122
|
+
type RowOutcome<T> = {
|
|
123
|
+
readonly ok: true;
|
|
124
|
+
readonly row: number;
|
|
125
|
+
readonly line: number;
|
|
126
|
+
readonly value: T;
|
|
127
|
+
} | {
|
|
128
|
+
readonly ok: false;
|
|
129
|
+
readonly row: number;
|
|
130
|
+
readonly line: number;
|
|
131
|
+
readonly errors: readonly RowError[];
|
|
132
|
+
};
|
|
133
|
+
interface ImportOptions<S extends Schema> extends ParseCsvOptions {
|
|
134
|
+
/** Column schema. Keys are matched against the header names. */
|
|
135
|
+
readonly columns: S;
|
|
136
|
+
/** CSV text to parse. Exactly one of `text` or `records` is required. */
|
|
137
|
+
readonly text?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Records from `parseCsvRecords`. Requires `header` with the column names, because the
|
|
140
|
+
* records do not carry them.
|
|
141
|
+
*/
|
|
142
|
+
readonly records?: readonly CsvRecord[];
|
|
143
|
+
/**
|
|
144
|
+
* `ignore` (default): unknown columns are skipped.
|
|
145
|
+
* `reject`: a non-empty value in an unknown column is an `UNKNOWN_COLUMN` row error.
|
|
146
|
+
*/
|
|
147
|
+
readonly unknownColumns?: "ignore" | "reject";
|
|
148
|
+
/** Row-level check, run only for rows that passed all column checks. Returns an error message. */
|
|
149
|
+
readonly validate?: (row: InferRow<S>) => string | undefined;
|
|
150
|
+
/** Called once per row in input order, after the row has been checked. */
|
|
151
|
+
readonly onRow?: (outcome: RowOutcome<InferRow<S>>) => void;
|
|
152
|
+
}
|
|
153
|
+
interface ImportResult<T> {
|
|
154
|
+
readonly accepted: T[];
|
|
155
|
+
/** All row errors. A row can contribute several entries, one per problem. */
|
|
156
|
+
readonly rejected: RowError[];
|
|
157
|
+
readonly summary: ImportSummary;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Imports CSV rows with partial success. Valid rows go to `accepted`, broken rows are collected
|
|
161
|
+
* in `rejected` with row number, line number, column and reason.
|
|
162
|
+
*
|
|
163
|
+
* Throws `ImportError` for whole-file problems (missing required column, limits exceeded).
|
|
164
|
+
* Storing the accepted rows is up to the caller.
|
|
165
|
+
*/
|
|
166
|
+
export declare function importRows<const S extends Schema>(options: ImportOptions<S>): ImportResult<InferRow<S>>;
|
|
167
|
+
/**
|
|
168
|
+
* Renders rejected rows as CSV with the header `line,row,column,code,message` and CRLF line endings.
|
|
169
|
+
*
|
|
170
|
+
* CSV injection protection: any text cell starting with `=`, `+`, `-`, `@`, tab or CR is prefixed
|
|
171
|
+
* with `'`, so spreadsheet applications do not evaluate it as a formula. Cells are quoted per
|
|
172
|
+
* RFC 4180 when they contain a comma, quote or line break.
|
|
173
|
+
*/
|
|
174
|
+
export declare function toErrorReportCsv(rejected: readonly RowError[]): string;
|
|
175
|
+
export type { ColumnOptions, ColumnRule, CsvRecord, ImportErrorCode, ImportErrorDetails, ImportOptions, ImportResult, ImportSummary, InferRow, LimitName, LimitOptions, ParseCsvOptions, RowError, RowErrorCode, RowOutcome, Schema };
|
|
176
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule for one column. `parse` receives the raw cell text and returns the typed value or throws.
|
|
3
|
+
* The thrown error's message is reported as a `PARSE` row error.
|
|
4
|
+
*/
|
|
5
|
+
interface ColumnRule<T = unknown, R extends boolean = boolean> {
|
|
6
|
+
/** Empty cells are a `REQUIRED` error. Optional columns yield `undefined` for empty cells. */
|
|
7
|
+
readonly required?: R;
|
|
8
|
+
readonly parse: (raw: string) => T;
|
|
9
|
+
}
|
|
10
|
+
interface ColumnOptions<R extends boolean = boolean> {
|
|
11
|
+
readonly required?: R;
|
|
12
|
+
}
|
|
13
|
+
/** Column name to rule. */
|
|
14
|
+
type Schema = Readonly<Record<string, ColumnRule<unknown, boolean>>>;
|
|
15
|
+
type ValueOf<R> = R extends {
|
|
16
|
+
readonly parse: (raw: string) => infer T;
|
|
17
|
+
} ? T : never;
|
|
18
|
+
type IsRequired<R> = R extends {
|
|
19
|
+
readonly required?: infer Q;
|
|
20
|
+
} ? [NonNullable<Q>] extends [true] ? true : false : false;
|
|
21
|
+
/** Row type produced by a schema: required columns are `T`, optional columns `T | undefined`. */
|
|
22
|
+
type InferRow<S extends Schema> = { -readonly [K in keyof S]: IsRequired<S[K]> extends true ? ValueOf<S[K]> : ValueOf<S[K]> | undefined; };
|
|
23
|
+
/** Trimmed text. */
|
|
24
|
+
export declare function string<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<string, R>;
|
|
25
|
+
/** Whole number within the safe integer range, e.g. `-42` or `+7`. */
|
|
26
|
+
export declare function int<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<number, R>;
|
|
27
|
+
/** Finite decimal number with `.` as decimal separator, e.g. `12`, `-0.5`, `1e3`. */
|
|
28
|
+
export declare function number<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<number, R>;
|
|
29
|
+
/** Accepts `true`, `false`, `1` or `0` (case-insensitive). */
|
|
30
|
+
export declare function boolean<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<boolean, R>;
|
|
31
|
+
/** ISO-8601 calendar date `YYYY-MM-DD`, returned as a `Date` at UTC midnight. */
|
|
32
|
+
export declare function date<const R extends boolean = false>(options?: ColumnOptions<R>): ColumnRule<Date, R>;
|
|
33
|
+
/**
|
|
34
|
+
* One of the given values, compared case-sensitively after trimming.
|
|
35
|
+
* Named `enumOf` because `enum` is a reserved word in JavaScript.
|
|
36
|
+
*/
|
|
37
|
+
export declare function enumOf<const V extends readonly string[], const R extends boolean = false>(values: V, options?: ColumnOptions<R>): ColumnRule<V[number], R>;
|
|
38
|
+
/** One data record as produced by the parser. */
|
|
39
|
+
interface CsvRecord {
|
|
40
|
+
/** Data row number, starting at 1. The header line is not counted. Blank lines are skipped. */
|
|
41
|
+
readonly row: number;
|
|
42
|
+
/** Physical line on which the record starts, starting at 1. */
|
|
43
|
+
readonly line: number;
|
|
44
|
+
/** Raw field values in column order. */
|
|
45
|
+
readonly values: readonly string[];
|
|
46
|
+
/**
|
|
47
|
+
* Set when the record has broken quoting (unterminated quoted field at end of input, or
|
|
48
|
+
* characters after a closing quote). `values` then holds a best-effort recovery.
|
|
49
|
+
*/
|
|
50
|
+
readonly quoteError?: string;
|
|
51
|
+
}
|
|
52
|
+
interface LimitOptions {
|
|
53
|
+
/** Maximum input size in UTF-8 bytes. Default 10 MiB. */
|
|
54
|
+
readonly maxBytes?: number;
|
|
55
|
+
/** Maximum number of data rows. Default 100000. */
|
|
56
|
+
readonly maxRows?: number;
|
|
57
|
+
/** Maximum length of a single field in UTF-16 code units. Default 10000. */
|
|
58
|
+
readonly maxFieldLength?: number;
|
|
59
|
+
}
|
|
60
|
+
interface ParseCsvOptions extends LimitOptions {
|
|
61
|
+
/** Field delimiter, a single character. Default ",". */
|
|
62
|
+
readonly delimiter?: string;
|
|
63
|
+
/** Detect the delimiter among `,` `;` and tab from the first line. Off by default. */
|
|
64
|
+
readonly autoDetectDelimiter?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* `true` (default): the first record is the header line.
|
|
67
|
+
* An array: the input has no header line and these are the column names.
|
|
68
|
+
*/
|
|
69
|
+
readonly header?: true | readonly string[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Parses CSV text into data records (RFC 4180 quoting, `\n`, `\r\n` and `\r` line endings,
|
|
73
|
+
* UTF-8 BOM removed). The header line is consumed and not returned.
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseCsvRecords(text: string, options?: ParseCsvOptions): CsvRecord[];
|
|
76
|
+
/** Whole-file error codes. Row-level problems are reported as `RowError`, never thrown. */
|
|
77
|
+
type ImportErrorCode = "MISSING_COLUMN" | "LIMIT_EXCEEDED" | "INVALID_HEADER";
|
|
78
|
+
/** Input limits that can be exceeded. */
|
|
79
|
+
type LimitName = "maxBytes" | "maxRows" | "maxFieldLength";
|
|
80
|
+
interface ImportErrorDetails {
|
|
81
|
+
/** MISSING_COLUMN: names of the required columns that are absent from the header. */
|
|
82
|
+
readonly columns?: readonly string[];
|
|
83
|
+
/** LIMIT_EXCEEDED: the limit that was exceeded. */
|
|
84
|
+
readonly limit?: LimitName;
|
|
85
|
+
/** LIMIT_EXCEEDED: the configured maximum. */
|
|
86
|
+
readonly max?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Typed error that aborts the whole import. Thrown for a missing required column,
|
|
90
|
+
* for exceeded input limits, and for a header line with broken quoting.
|
|
91
|
+
*/
|
|
92
|
+
export declare class ImportError extends Error {
|
|
93
|
+
readonly code: ImportErrorCode;
|
|
94
|
+
readonly columns: readonly string[];
|
|
95
|
+
readonly limit: LimitName | undefined;
|
|
96
|
+
readonly max: number | undefined;
|
|
97
|
+
constructor(code: ImportErrorCode, message: string, details?: ImportErrorDetails);
|
|
98
|
+
}
|
|
99
|
+
type RowErrorCode = "REQUIRED" | "PARSE" | "VALIDATION" | "UNKNOWN_COLUMN" | "WRONG_FIELD_COUNT" | "PARSE_QUOTE";
|
|
100
|
+
/**
|
|
101
|
+
* One problem found in one data row. A row can produce several errors (one per column).
|
|
102
|
+
* `message` is at most 100 characters and contains no control characters or raw input dumps.
|
|
103
|
+
*/
|
|
104
|
+
interface RowError {
|
|
105
|
+
/** Data row number, starting at 1. The header line is not counted. */
|
|
106
|
+
readonly row: number;
|
|
107
|
+
/** Physical line on which the record starts, starting at 1. */
|
|
108
|
+
readonly line: number;
|
|
109
|
+
readonly column?: string;
|
|
110
|
+
readonly code: RowErrorCode;
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}
|
|
113
|
+
interface ImportSummary {
|
|
114
|
+
/** Number of data rows in the input. */
|
|
115
|
+
readonly total: number;
|
|
116
|
+
/** Number of accepted rows. */
|
|
117
|
+
readonly accepted: number;
|
|
118
|
+
/** Number of distinct rejected rows. The `rejected` list can hold more entries (one per error). */
|
|
119
|
+
readonly rejected: number;
|
|
120
|
+
}
|
|
121
|
+
/** Per-row result passed to the `onRow` callback, in input order. */
|
|
122
|
+
type RowOutcome<T> = {
|
|
123
|
+
readonly ok: true;
|
|
124
|
+
readonly row: number;
|
|
125
|
+
readonly line: number;
|
|
126
|
+
readonly value: T;
|
|
127
|
+
} | {
|
|
128
|
+
readonly ok: false;
|
|
129
|
+
readonly row: number;
|
|
130
|
+
readonly line: number;
|
|
131
|
+
readonly errors: readonly RowError[];
|
|
132
|
+
};
|
|
133
|
+
interface ImportOptions<S extends Schema> extends ParseCsvOptions {
|
|
134
|
+
/** Column schema. Keys are matched against the header names. */
|
|
135
|
+
readonly columns: S;
|
|
136
|
+
/** CSV text to parse. Exactly one of `text` or `records` is required. */
|
|
137
|
+
readonly text?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Records from `parseCsvRecords`. Requires `header` with the column names, because the
|
|
140
|
+
* records do not carry them.
|
|
141
|
+
*/
|
|
142
|
+
readonly records?: readonly CsvRecord[];
|
|
143
|
+
/**
|
|
144
|
+
* `ignore` (default): unknown columns are skipped.
|
|
145
|
+
* `reject`: a non-empty value in an unknown column is an `UNKNOWN_COLUMN` row error.
|
|
146
|
+
*/
|
|
147
|
+
readonly unknownColumns?: "ignore" | "reject";
|
|
148
|
+
/** Row-level check, run only for rows that passed all column checks. Returns an error message. */
|
|
149
|
+
readonly validate?: (row: InferRow<S>) => string | undefined;
|
|
150
|
+
/** Called once per row in input order, after the row has been checked. */
|
|
151
|
+
readonly onRow?: (outcome: RowOutcome<InferRow<S>>) => void;
|
|
152
|
+
}
|
|
153
|
+
interface ImportResult<T> {
|
|
154
|
+
readonly accepted: T[];
|
|
155
|
+
/** All row errors. A row can contribute several entries, one per problem. */
|
|
156
|
+
readonly rejected: RowError[];
|
|
157
|
+
readonly summary: ImportSummary;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Imports CSV rows with partial success. Valid rows go to `accepted`, broken rows are collected
|
|
161
|
+
* in `rejected` with row number, line number, column and reason.
|
|
162
|
+
*
|
|
163
|
+
* Throws `ImportError` for whole-file problems (missing required column, limits exceeded).
|
|
164
|
+
* Storing the accepted rows is up to the caller.
|
|
165
|
+
*/
|
|
166
|
+
export declare function importRows<const S extends Schema>(options: ImportOptions<S>): ImportResult<InferRow<S>>;
|
|
167
|
+
/**
|
|
168
|
+
* Renders rejected rows as CSV with the header `line,row,column,code,message` and CRLF line endings.
|
|
169
|
+
*
|
|
170
|
+
* CSV injection protection: any text cell starting with `=`, `+`, `-`, `@`, tab or CR is prefixed
|
|
171
|
+
* with `'`, so spreadsheet applications do not evaluate it as a formula. Cells are quoted per
|
|
172
|
+
* RFC 4180 when they contain a comma, quote or line break.
|
|
173
|
+
*/
|
|
174
|
+
export declare function toErrorReportCsv(rejected: readonly RowError[]): string;
|
|
175
|
+
export type { ColumnOptions, ColumnRule, CsvRecord, ImportErrorCode, ImportErrorDetails, ImportOptions, ImportResult, ImportSummary, InferRow, LimitName, LimitOptions, ParseCsvOptions, RowError, RowErrorCode, RowOutcome, Schema };
|
|
176
|
+
//# sourceMappingURL=index.d.ts.map
|