( props: Partial<T> )
| 1 | import type { ClientSharedServerContext } from '#site/types'; |
| 2 | |
| 3 | export const assignClientContext = <T extends ClientSharedServerContext>( |
| 4 | props: Partial<T> |
| 5 | ) => |
| 6 | ({ |
| 7 | frontmatter: props.frontmatter ?? {}, |
| 8 | pathname: props.pathname ?? '', |
| 9 | headings: props.headings ?? [], |
| 10 | readingTime: props.readingTime ?? { |
| 11 | text: '', |
| 12 | minutes: 0, |
| 13 | time: 0, |
| 14 | words: 0, |
| 15 | }, |
| 16 | filename: props.filename ?? '', |
| 17 | os: props.os ?? 'OTHER', |
| 18 | architecture: props.architecture ?? 'x64', |
| 19 | bitness: props.bitness ?? 64, |
| 20 | }) as T; |
no outgoing calls
no test coverage detected