Skip to content

livePreviewPath

livePreviewPath<TCollectionSlug>(slug, resolve): LivePreviewUrlResolver

Defined in: packages/core/src/livePreview/urlHelpers.ts:82

Types a client-side preview-URL resolver against a real collection.

Rarely needed: a url in the root map is typed by its key, and one inside defineCollection by its sibling slug. Provided so the client and server forms have symmetrical escape hatches where inference cannot reach.

TCollectionSlug extends string

TCollectionSlug

The owning collection’s slug, used only to infer the document type.

(doc) => string | undefined

The resolver, checked against that collection’s real document.

LivePreviewUrlResolver

The same function, re-typed to the loose public resolver signature.