UNPKG

@prismicio/client

Version:

The official JavaScript + TypeScript client library for Prismic

28 lines (27 loc) 986 B
import { Client } from "./Client.js"; //#region src/createClient.ts /** * Creates a Prismic client that can be used to query content from a repository. * * @example * ;```ts * // With a repository name * createClient("my-repo") * * // With a full Prismic Content API endpoint * createClient("https://my-repo.cdn.prismic.io/api/v2") * ``` * * @typeParam TDocuments - A union of Prismic page and custom types for the * repository. * @param repositoryNameOrEndpoint - The Prismic repository name or full Content API endpoint for * the repository. * @param options - Configuration that determines how content will be queried from the Prismic * repository. * @returns A client that can query content from the repository. * @see https://prismic.io/docs/technical-reference/prismicio-client/v7 */ const createClient = (repositoryNameOrEndpoint, options) => new Client(repositoryNameOrEndpoint, options); //#endregion export { createClient }; //# sourceMappingURL=createClient.js.map