UNPKG

next-mdx-remote-client

Version:

A wrapper of the `@mdx-js/mdx` for the `nextjs` applications in order to load MDX content. It is a fork of `next-mdx-remote`.

14 lines (13 loc) 659 B
/** * Copyright (c) @talatkuyuk AKA @ipikuka * SPDX-License-Identifier: MPL-2.0 */ import type { SerializeResult, SerializeProps, SerializeOptions } from "./types.js"; export type { SerializeResult, SerializeProps, SerializeOptions }; /** * compiles the MDX source. * * the compiled source can be passed into "<MDXClient />" or "hydrate" to be rendered on the client side (csr). * */ export declare function serialize<TFrontmatter extends Record<string, unknown> = Record<string, unknown>, TScope extends Record<string, unknown> = Record<string, unknown>>({ source, options, }: SerializeProps<TScope>): Promise<SerializeResult<TFrontmatter, TScope>>;