@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 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: unknown; name: unknown }`.
100
- * - Otherwise, infers `unknown` (typically a string).
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]: unknown;
106
- } : unknown;
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 raw values.
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>> : Array<unknown>;
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: unknown; name: unknown }`.
100
- * - Otherwise, infers `unknown` (typically a string).
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]: unknown;
106
- } : unknown;
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 raw values.
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>> : Array<unknown>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuji-min/google-docs-parser",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Turn your Google Docs into a Headless CMS. A strictly typed, schema-based parser for Google Docs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",