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`.

13 lines (12 loc) 667 B
/** * Copyright (c) @talatkuyuk AKA @ipikuka * SPDX-License-Identifier: MPL-2.0 */ import type { EvaluateProps, EvaluateResult } from "./types.js"; /** * "compiles" the MDX source and "runs" the javascript code in the compiled source, so it basically "evaluates" the MDX. * * returns the frontmatter, exported object and the react server component to be rendered on the server. * */ export declare function evaluate<TFrontmatter extends Record<string, unknown> = Record<string, unknown>, TScope extends Record<string, unknown> = Record<string, unknown>>({ source, options, components, }: EvaluateProps<TScope>): Promise<EvaluateResult<TFrontmatter, TScope>>;