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

15 lines (14 loc) 641 B
/** * Copyright (c) @talatkuyuk AKA @ipikuka * SPDX-License-Identifier: MPL-2.0 */ import { type Compatible } from "vfile"; import type { PrepareResult } from "./types.js"; /** * turns the source into vfile, gets the fronmatter, strips it out from the vfile * * @param source markdown or MDX source * @param parseFrontmatter indicates whether or not the frontmatter should be parsed out of the source * @returns the frontmatter and stripped vfile */ export declare function prepare<TFrontmatter extends Record<string, unknown> = Record<string, unknown>>(source: Compatible, parseFrontmatter?: boolean): PrepareResult<TFrontmatter>;