diff --git a/src/types/migration/Link.ts b/src/types/migration/Link.ts index 68362c43..81f978c4 100644 --- a/src/types/migration/Link.ts +++ b/src/types/migration/Link.ts @@ -1,5 +1,18 @@ import type { LinkType, OptionalLinkProperties } from "../value/link" +/** + * Adds `OptionalLinkProperties` to any type that looks like a link object (one + * that includes a valid `link_type` property). + * + * @example + * + * ```ts + * type Example = MaybeLink + * // PrismicDocument | (LinkField & OptionalLinkProperties) + * ``` + * + * @typeParam T - The type to augment. + */ export type MaybeLink = | Exclude | (Extract &