read-excel-file 5.8.2 → 5.8.3
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/package.json +1 -1
- package/types.d.ts +5 -5
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -39,18 +39,18 @@ interface SchemaEntryForValueLegacy<Key extends keyof Object, Object, TopLevelOb
|
|
|
39
39
|
|
|
40
40
|
// Implementing recursive types in TypeScript:
|
|
41
41
|
// https://dev.to/busypeoples/notes-on-typescript-recursive-types-and-immutability-5ck1
|
|
42
|
-
interface SchemaEntryRecursive<Key extends keyof Object, Object, TopLevelObject> {
|
|
42
|
+
interface SchemaEntryRecursive<Key extends keyof Object, Object, TopLevelObject, ColumnTitle extends string> {
|
|
43
43
|
prop: Key;
|
|
44
|
-
type: Record<
|
|
44
|
+
type: Record<ColumnTitle, SchemaEntry<keyof Object[Key], Object[Key], TopLevelObject, ColumnTitle>>;
|
|
45
45
|
required?: SchemaEntryRequiredProperty<TopLevelObject>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
type SchemaEntry<Key extends keyof Object, Object, TopLevelObject> =
|
|
48
|
+
type SchemaEntry<Key extends keyof Object, Object, TopLevelObject, ColumnTitle extends string> =
|
|
49
49
|
SchemaEntryForValue<Key, Object, TopLevelObject> |
|
|
50
50
|
SchemaEntryForValueLegacy<Key, Object, TopLevelObject> |
|
|
51
|
-
SchemaEntryRecursive<Key, Object, TopLevelObject>
|
|
51
|
+
SchemaEntryRecursive<Key, Object, TopLevelObject, ColumnTitle>
|
|
52
52
|
|
|
53
|
-
export type Schema<Object = Record<string, any
|
|
53
|
+
export type Schema<Object = Record<string, any>, ColumnTitle extends string = string> = Record<ColumnTitle, SchemaEntry<keyof Object, Object, Object, ColumnTitle>>
|
|
54
54
|
|
|
55
55
|
export interface Error<Value = any> {
|
|
56
56
|
error: string;
|