read-excel-file 5.4.4 → 5.4.7

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
@@ -7,6 +7,7 @@ import {
7
7
  } from './types.d';
8
8
 
9
9
  export {
10
+ Schema,
10
11
  ParsedObjectsResult,
11
12
  Row,
12
13
  Integer,
@@ -24,4 +25,4 @@ export function readXlsxFile(input: Input, options?: ParseWithoutSchemaOptions)
24
25
 
25
26
  export function readSheetNames(input: Input) : Promise<string[]>;
26
27
 
27
- export default readXlsxFile;
28
+ export default readXlsxFile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "read-excel-file",
3
- "version": "5.4.4",
3
+ "version": "5.4.7",
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
  "main": "index.cjs",
package/types.d.ts CHANGED
@@ -11,16 +11,18 @@ type BasicType =
11
11
  | typeof URL
12
12
  | typeof Email;
13
13
 
14
- export type Type = <T>(value: Cell) => T | undefined;
14
+ export type Type<T> = (value: Cell) => T | undefined;
15
15
 
16
16
  interface SchemaEntryBasic<T> {
17
17
  prop: string;
18
- type?: BasicType | Type;
18
+ type?: BasicType | Type<T>;
19
19
  oneOf?: T[];
20
20
  required?: boolean;
21
21
  validate?(value: T): void;
22
22
  }
23
23
 
24
+ // Legacy versions of this library supported supplying a custom `parse()` function.
25
+ // Since then, the `parse()` function has been renamed to `type()` function.
24
26
  interface SchemaEntryParsed<T> {
25
27
  prop: string;
26
28
  parse: (value: Cell) => T | undefined;