@prismicio/types-internal 2.3.0 → 2.3.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.
|
@@ -3190,7 +3190,7 @@ declare function extractMetadata(data: {
|
|
|
3190
3190
|
slugs: ReadonlyArray<string>;
|
|
3191
3191
|
uid: string | undefined;
|
|
3192
3192
|
};
|
|
3193
|
-
declare function parseLegacyDocument(legacyDoc: unknown, customType: {
|
|
3193
|
+
declare function parseLegacyDocument(legacyDoc: unknown, customType: StaticCustomType | {
|
|
3194
3194
|
customTypeId: string;
|
|
3195
3195
|
fields: Record<string, StaticWidget>;
|
|
3196
3196
|
}): Document | undefined;
|
package/package.json
CHANGED
package/src/content/Document.ts
CHANGED
|
@@ -132,10 +132,12 @@ function extractMetadata(data: { [p: string]: unknown }): {
|
|
|
132
132
|
|
|
133
133
|
function parseLegacyDocument(
|
|
134
134
|
legacyDoc: unknown,
|
|
135
|
-
customType:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
customType:
|
|
136
|
+
| StaticCustomType
|
|
137
|
+
| {
|
|
138
|
+
customTypeId: string
|
|
139
|
+
fields: Record<string, StaticWidget>
|
|
140
|
+
},
|
|
139
141
|
): Document | undefined {
|
|
140
142
|
const result = pipe(
|
|
141
143
|
// ensure it's the right document format first
|