read-excel-file 5.2.16 → 5.2.20

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/index.d.ts CHANGED
@@ -10,8 +10,8 @@ export function parseExcelDate(excelSerialDate: number) : typeof Date;
10
10
 
11
11
  type Input = File;
12
12
 
13
- function readXlsxFile(input: Input, options: ParseWithSchemaOptions) : Promise<ParsedObjectsResult>;
14
- function readXlsxFile(input: Input, options: ParseWithMapOptions) : Promise<ParsedObjectsResult>;
15
- function readXlsxFile(input: Input, options?: ParseWithoutSchemaOptions) : Promise<Row[]>;
13
+ export function readXlsxFile<T extends object>(input: Input, options: ParseWithSchemaOptions<T>) : Promise<ParsedObjectsResult<T>>;
14
+ export function readXlsxFile<T extends object>(input: Input, options: ParseWithMapOptions) : Promise<ParsedObjectsResult<T>>;
15
+ export function readXlsxFile(input: Input, options?: ParseWithoutSchemaOptions) : Promise<Row[]>;
16
16
 
17
17
  export default readXlsxFile;
package/node/index.d.ts CHANGED
@@ -16,8 +16,8 @@ export function parseExcelDate(excelSerialDate: number) : typeof Date;
16
16
 
17
17
  type Input = Stream | PathLike;
18
18
 
19
- function readXlsxFile(input: Input, options: ParseWithSchemaOptions) : Promise<ParsedObjectsResult>;
20
- function readXlsxFile(input: Input, options: ParseWithMapOptions) : Promise<ParsedObjectsResult>;
21
- function readXlsxFile(input: Input, options?: ParseWithoutSchemaOptions) : Promise<Row[]>;
19
+ export function readXlsxFile<T extends object>(input: Input, options: ParseWithSchemaOptions<T>) : Promise<ParsedObjectsResult<T>>;
20
+ export function readXlsxFile<T extends object>(input: Input, options: ParseWithMapOptions) : Promise<ParsedObjectsResult<T>>;
21
+ export function readXlsxFile(input: Input, options?: ParseWithoutSchemaOptions) : Promise<Row[]>;
22
22
 
23
23
  export default readXlsxFile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "read-excel-file",
3
- "version": "5.2.16",
3
+ "version": "5.2.20",
4
4
  "description": "Read small to medium `*.xlsx` files in a browser or Node.js. Parse to JSON with a strict schema.",
5
5
  "module": "index.js",
6
6
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -58,7 +58,7 @@ export interface ParsedObjectsResult<T extends object> {
58
58
  }
59
59
 
60
60
  export interface ParseWithSchemaOptions<T extends object> {
61
- schema: Schema<T>;
61
+ schema: Schema;
62
62
  transformData?: (rows: Row[]) => Row[];
63
63
  sheet?: number | string;
64
64
  }