@prismicio/types-internal 2.7.0-alpha.6 → 2.7.0-alpha.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.
@@ -51,7 +51,8 @@ exports.ImageLinkContent = t.intersection([
51
51
  ]);
52
52
  // FileLink.
53
53
  exports.FileLinkType = "FileLink";
54
- const FileLinkKind = new t.Type("FileLinkKind", (input) => input === "file" || input === "all", (input, context) => input === "file" || input === "all"
54
+ const isFileLinkKind = (input) => input === "file" || input === "image/jpeg" || input === "all";
55
+ const FileLinkKind = new t.Type("FileLinkKind", (input) => isFileLinkKind(input), (input, context) => isFileLinkKind(input)
55
56
  ? t.success("file")
56
57
  : t.failure(input, context), () => "file");
57
58
  const fileLinkLegacyCodec = t.intersection([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "2.7.0-alpha.6",
3
+ "version": "2.7.0-alpha.7",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -70,11 +70,14 @@ export type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>
70
70
 
71
71
  export const FileLinkType = "FileLink"
72
72
 
73
+ const isFileLinkKind = (input: unknown) =>
74
+ input === "file" || input === "image/jpeg" || input === "all"
75
+
73
76
  const FileLinkKind = new t.Type<"file">(
74
77
  "FileLinkKind",
75
- (input): input is "file" => input === "file" || input === "all",
78
+ (input): input is "file" => isFileLinkKind(input),
76
79
  (input, context) =>
77
- input === "file" || input === "all"
80
+ isFileLinkKind(input)
78
81
  ? t.success("file" as const)
79
82
  : t.failure(input, context),
80
83
  () => "file" as const,