@prismicio/types
Advanced tools
Comparing version 0.2.1-alpha.1 to 0.2.1
@@ -0,0 +0,0 @@ declare const LinkType: { |
@@ -247,8 +247,11 @@ declare type EmptyObjectField = Record<string, never>; | ||
* | ||
* **Note**: Passing `null` to the `ThumbnailNames` parameter is deprecated and | ||
* will be removed in a future version. Use `never` instead. | ||
* | ||
* @typeParam ThumbnailNames - Names of thumbnails. If the field does not | ||
* contain thumbnails, `null` can be used to "disable" thumbnail fields. | ||
* contain thumbnails, `never` can be used to "disable" thumbnail fields. | ||
* @typeParam State - State of the field which determines its shape. | ||
* @see Image field documentation: {@link https://prismic.io/docs/core-concepts/image} | ||
*/ | ||
declare type ImageField<ThumbnailNames extends string | null = never, State extends FieldState = FieldState> = Simplify<ImageFieldImage<State> & Record<ThumbnailNames extends string ? Exclude<ThumbnailNames, keyof ImageFieldImage> : never, ImageFieldImage<State>>>; | ||
declare type ImageField<ThumbnailNames extends string | null = never, State extends FieldState = FieldState> = Simplify<ImageFieldImage<State> & Record<Exclude<Extract<ThumbnailNames, string>, keyof ImageFieldImage>, ImageFieldImage<State>>>; | ||
/** | ||
@@ -576,3 +579,2 @@ * Link Types | ||
slice_label: string | null; | ||
id?: string; | ||
primary: PrimaryFields; | ||
@@ -589,3 +591,2 @@ items: ItemsFields[]; | ||
slice_label: null; | ||
id?: string; | ||
} & Variations; | ||
@@ -592,0 +593,0 @@ interface SharedSliceVariation<Variation = string, PrimaryFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>, ItemsFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>> { |
{ | ||
"name": "@prismicio/types", | ||
"version": "0.2.1-alpha.1", | ||
"version": "0.2.1", | ||
"description": "Type definitions for Prismic related structure", | ||
@@ -50,4 +50,4 @@ "keywords": [ | ||
"release": "npm run build && npm run test && standard-version && git push --follow-tags && npm run build && npm publish", | ||
"release:alpha": "npm run build && npm run test && standard-version --release-as patch --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha", | ||
"release:alpha:dry": "standard-version --release-as patch --prerelease alpha --dry-run", | ||
"release:alpha": "npm run build && npm run test && standard-version --release-as minor --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha", | ||
"release:alpha:dry": "standard-version --release-as minor --prerelease alpha --dry-run", | ||
"release:dry": "standard-version --dry-run", | ||
@@ -54,0 +54,0 @@ "size": "size-limit", |
@@ -349,4 +349,7 @@ type EmptyObjectField = Record<string, never>; | ||
* | ||
* **Note**: Passing `null` to the `ThumbnailNames` parameter is deprecated and | ||
* will be removed in a future version. Use `never` instead. | ||
* | ||
* @typeParam ThumbnailNames - Names of thumbnails. If the field does not | ||
* contain thumbnails, `null` can be used to "disable" thumbnail fields. | ||
* contain thumbnails, `never` can be used to "disable" thumbnail fields. | ||
* @typeParam State - State of the field which determines its shape. | ||
@@ -356,2 +359,5 @@ * @see Image field documentation: {@link https://prismic.io/docs/core-concepts/image} | ||
export type ImageField< | ||
// `null` is included for backwards compatibility with older versions of | ||
// this package. `null` should be treated as deprecated. `never` is | ||
// preferred. | ||
ThumbnailNames extends string | null = never, | ||
@@ -362,5 +368,3 @@ State extends FieldState = FieldState, | ||
Record< | ||
ThumbnailNames extends string | ||
? Exclude<ThumbnailNames, keyof ImageFieldImage> | ||
: never, | ||
Exclude<Extract<ThumbnailNames, string>, keyof ImageFieldImage>, | ||
ImageFieldImage<State> | ||
@@ -814,3 +818,2 @@ > | ||
slice_label: string | null; | ||
id?: string; | ||
primary: PrimaryFields; | ||
@@ -831,3 +834,2 @@ items: ItemsFields[]; | ||
slice_label: null; | ||
id?: string; | ||
} & Variations; | ||
@@ -834,0 +836,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3725
220638