Type Alias: Module

View as Markdown
type Module<TExports = unknown> = string & {
  readonly [EXPORTS]: TExports;
};

Defined in: module.ts:22

A document's body when it is a module: the module's file, relative to the project root. Pass it to importModule from tomekit/content-modules to get the module's exports.

Example

import { posts } from "tomekit/content";
import { importModule } from "tomekit/content-modules";

const { default: Content } = await importModule(posts.get("hello-world").body);