UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

19 lines (15 loc) 464 B
import {map, type OperatorFunction} from 'rxjs' import {type DefaultRenderingContext, type StudioRenderingContext} from './types' const DEFAULT_RENDERING_CONTEXT: DefaultRenderingContext = { name: 'default', metadata: {}, } /** * @internal */ export function defaultRenderingContext(): OperatorFunction< StudioRenderingContext | undefined, StudioRenderingContext > { return map((renderingContext) => renderingContext ?? DEFAULT_RENDERING_CONTEXT) }