diff --git a/src/buildQueryURL.ts b/src/buildQueryURL.ts index 5167a8a9..4958666d 100644 --- a/src/buildQueryURL.ts +++ b/src/buildQueryURL.ts @@ -160,6 +160,7 @@ export interface QueryParams { * Strings and arrays of strings are deprecated as of * `@prismicio/client@7.0.0`. Please migrate to the more explicit array of * objects. + * * @example * * ```typescript diff --git a/src/createClient.ts b/src/createClient.ts index d33a6f98..88e75eea 100644 --- a/src/createClient.ts +++ b/src/createClient.ts @@ -370,6 +370,7 @@ export interface CreateClient { * * @typeParam TDocuments - A map of Prismic document type IDs mapped to their * TypeScript type. + * * @param repositoryNameOrEndpoint - The Prismic repository name or full Rest * API V2 endpoint for the repository. * @param options - Configuration that determines how content will be queried @@ -732,6 +733,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -763,6 +765,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -800,6 +803,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -834,6 +838,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -874,6 +879,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -920,6 +926,7 @@ export class Client { * for all documents and is made available on its `id` property. A UID is * provided in the Prismic editor and is unique among all documents of its * custom type. + * * @example * * ```ts @@ -964,6 +971,7 @@ export class Client { * instance. For example, a repository may be configured to contain just one * Settings document. This is in contrast to a repeatable custom type which * allows multiple instances of itself. + * * @example * * ```ts diff --git a/src/getRepositoryName.ts b/src/getRepositoryName.ts index 8aeb830c..59305f4f 100644 --- a/src/getRepositoryName.ts +++ b/src/getRepositoryName.ts @@ -6,6 +6,7 @@ import { PrismicError } from "./errors/PrismicError"; * * @typeParam RepositoryEndpoint - Prismic Rest API V2 endpoint for the * repository. + * * @param repositoryEndpoint - Prismic Rest API V2 endpoint for the repository. * * @returns The Prismic repository's name. diff --git a/src/helpers/asHTML.ts b/src/helpers/asHTML.ts index ddc4e6bc..27db4aff 100644 --- a/src/helpers/asHTML.ts +++ b/src/helpers/asHTML.ts @@ -255,12 +255,6 @@ export const asHTML: { * * @deprecated Use object-style configuration instead. * - * ```ts - * asHTML(field); - * asHTML(field, { linkResolver }); - * asHTML(field, { serializer }); - * asHTML(field, { linkResolver, serializer }); - * ``` * @param richTextField - A rich text or title field from Prismic * @param linkResolver - An optional link resolver function to resolve links, * without it you're expected to use the `routes` options from the API diff --git a/src/helpers/asImagePixelDensitySrcSet.ts b/src/helpers/asImagePixelDensitySrcSet.ts index 20801908..55b4a330 100644 --- a/src/helpers/asImagePixelDensitySrcSet.ts +++ b/src/helpers/asImagePixelDensitySrcSet.ts @@ -70,6 +70,7 @@ type AsImagePixelDensitySrcSetReturnType< * * @returns A `srcset` attribute value for the image field with Imgix URL * parameters (if given). If the image field is empty, `null` is returned. + * * @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering */ export const asImagePixelDensitySrcSet = < diff --git a/src/helpers/asImageSrc.ts b/src/helpers/asImageSrc.ts index 64e9ba08..25edaa53 100644 --- a/src/helpers/asImageSrc.ts +++ b/src/helpers/asImageSrc.ts @@ -27,6 +27,7 @@ type AsImageSrcReturnType = * * @returns The image field's image URL with transformations applied (if given). * If the image field is empty, `null` is returned. + * * @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering */ export const asImageSrc = ( diff --git a/src/helpers/asImageWidthSrcSet.ts b/src/helpers/asImageWidthSrcSet.ts index 2e6896c5..5632a48c 100644 --- a/src/helpers/asImageWidthSrcSet.ts +++ b/src/helpers/asImageWidthSrcSet.ts @@ -74,6 +74,7 @@ type AsImageWidthSrcSetConfig = Omit & { * * @returns A `srcset` attribute value for the image field with Imgix URL * parameters (if given). If the image field is empty, `null` is returned. + * * @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering */ export const asImageWidthSrcSet = < diff --git a/src/helpers/asLink.ts b/src/helpers/asLink.ts index f2b11920..7924218d 100644 --- a/src/helpers/asLink.ts +++ b/src/helpers/asLink.ts @@ -10,6 +10,7 @@ import { documentToLinkField } from "./documentToLinkField"; * * @typeParam ReturnType - Return type of your link resolver function, useful if * you prefer to return a complex object + * * @param linkToDocumentField - A document link field to resolve * * @returns Resolved URL @@ -75,6 +76,7 @@ export const asLink: { * * @returns Resolved URL or, if the provided link field or document is empty, * `null` + * * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} */ @@ -95,10 +97,6 @@ export const asLink: { * * @deprecated Use object-style configuration instead. * - * ```ts - * asLink(field); - * asLink(field, { linkResolver }); - * ``` * @typeParam LinkResolverFunctionReturnType - link resolver function return * type * @typeParam Field - Link field or Prismic document to resolve to a URL @@ -110,6 +108,7 @@ export const asLink: { * * @returns Resolved URL or, if the provided link field or document is empty, * `null` + * * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} */ diff --git a/src/helpers/asLinkAttrs.ts b/src/helpers/asLinkAttrs.ts index c4843338..6b530025 100644 --- a/src/helpers/asLinkAttrs.ts +++ b/src/helpers/asLinkAttrs.ts @@ -77,11 +77,13 @@ type AsLinkAttrsReturnType< * type * @typeParam Field - Link field or Prismic document to resolve to link * attributes + * * @param linkFieldOrDocument - Any kind of link field or a document to resolve * @param config - Configuration that determines the output of `asLinkAttrs()` * * @returns Resolved set of link attributes or, if the provided link field or * document is empty, and empty object + * * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} */ diff --git a/src/helpers/asText.ts b/src/helpers/asText.ts index 0334972c..2cfe41d6 100644 --- a/src/helpers/asText.ts +++ b/src/helpers/asText.ts @@ -47,10 +47,6 @@ export const asText: { * * @deprecated Use object-style configuration instead. * - * ```ts - * asText(field); - * asText(field, { separator }); - * ``` * @param richTextField - A rich text or title field from Prismic * @param separator - Separator used to join each element, defaults to a space *