@yuji-min/google-docs-parser 1.0.0 → 1.0.1
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/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -96,23 +96,23 @@ interface ParseSchema {
|
|
|
96
96
|
/**
|
|
97
97
|
* Helper Type: Infers the object shape for a single text item based on `keys`.
|
|
98
98
|
*
|
|
99
|
-
* - If `keys` are present (e.g., `["role", "name"]`), infers `{ role:
|
|
100
|
-
* - Otherwise, infers `
|
|
99
|
+
* - If `keys` are present (e.g., `["role", "name"]`), infers `{ role: string; name: string }`.
|
|
100
|
+
* - Otherwise, infers `string`.
|
|
101
101
|
*/
|
|
102
102
|
type ItemField<T extends Schema> = T extends {
|
|
103
103
|
keys: readonly (infer K)[];
|
|
104
104
|
} ? {
|
|
105
|
-
[P in K & string]:
|
|
106
|
-
} :
|
|
105
|
+
[P in K & string]: string;
|
|
106
|
+
} : string;
|
|
107
107
|
/**
|
|
108
108
|
* Helper Type: Infers the result type for a `List` content.
|
|
109
109
|
*
|
|
110
110
|
* - If the schema has keys, returns an array of objects.
|
|
111
|
-
* - Otherwise, returns an array of
|
|
111
|
+
* - Otherwise, returns an array of strings.
|
|
112
112
|
*/
|
|
113
113
|
type ContentListType<C extends List> = C extends {
|
|
114
114
|
keys: readonly any[];
|
|
115
|
-
} ? Array<ItemField<C>> :
|
|
115
|
+
} ? Array<ItemField<C>> : string[];
|
|
116
116
|
/**
|
|
117
117
|
* Helper Type: Recursively infers the type of a Node's content.
|
|
118
118
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -96,23 +96,23 @@ interface ParseSchema {
|
|
|
96
96
|
/**
|
|
97
97
|
* Helper Type: Infers the object shape for a single text item based on `keys`.
|
|
98
98
|
*
|
|
99
|
-
* - If `keys` are present (e.g., `["role", "name"]`), infers `{ role:
|
|
100
|
-
* - Otherwise, infers `
|
|
99
|
+
* - If `keys` are present (e.g., `["role", "name"]`), infers `{ role: string; name: string }`.
|
|
100
|
+
* - Otherwise, infers `string`.
|
|
101
101
|
*/
|
|
102
102
|
type ItemField<T extends Schema> = T extends {
|
|
103
103
|
keys: readonly (infer K)[];
|
|
104
104
|
} ? {
|
|
105
|
-
[P in K & string]:
|
|
106
|
-
} :
|
|
105
|
+
[P in K & string]: string;
|
|
106
|
+
} : string;
|
|
107
107
|
/**
|
|
108
108
|
* Helper Type: Infers the result type for a `List` content.
|
|
109
109
|
*
|
|
110
110
|
* - If the schema has keys, returns an array of objects.
|
|
111
|
-
* - Otherwise, returns an array of
|
|
111
|
+
* - Otherwise, returns an array of strings.
|
|
112
112
|
*/
|
|
113
113
|
type ContentListType<C extends List> = C extends {
|
|
114
114
|
keys: readonly any[];
|
|
115
|
-
} ? Array<ItemField<C>> :
|
|
115
|
+
} ? Array<ItemField<C>> : string[];
|
|
116
116
|
/**
|
|
117
117
|
* Helper Type: Recursively infers the type of a Node's content.
|
|
118
118
|
*
|
package/package.json
CHANGED