@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
37 lines (35 loc) • 1.09 kB
TypeScript
import { CustomTypeModelFieldType } from "./types.js";
//#region src/types/model/image.d.ts
/**
* Dimension constraints for an image custom type field.
*
* More details: {@link https://prismic.io/docs/image}
*/
interface CustomTypeModelImageConstraint {
width?: number | null;
height?: number | null;
}
/**
* A thumbnail for an image custom type field.
*
* More details: {@link https://prismic.io/docs/image}
*/
interface CustomTypeModelImageThumbnail<Name extends string = string> extends CustomTypeModelImageConstraint {
name: Name;
}
/**
* An image custom type field.
*
* More details: {@link https://prismic.io/docs/image}
*/
interface CustomTypeModelImageField<ThumbnailNames extends string = string> {
type: typeof CustomTypeModelFieldType.Image;
config?: {
label?: string | null;
constraint?: CustomTypeModelImageConstraint;
thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
};
}
//#endregion
export { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail };
//# sourceMappingURL=image.d.ts.map