@sanity/tsdoc
Version:
Generate API reference docs from TypeScript projects and store in a Sanity-friendly JSON format. Render a static frontend, or as React components.
16 lines (13 loc) • 476 B
text/typescript
import {TSDocStore} from '@sanity/tsdoc/store'
import {TSDocAppParams} from '@sanity/tsdoc/store'
import {createContext} from 'react'
/** @beta */
export interface TSDocContextValue {
basePath: string
path: string
params: TSDocAppParams
updateParams: (fn: (params: TSDocAppParams) => TSDocAppParams) => void
onPathChange: (nextPath: string, replace?: boolean) => void
store: TSDocStore
}
export const TSDocContext = createContext<TSDocContextValue | null>(null)