Skip to documentation
Docs navigation
Docs/MemoGrafterConfigSource
Types

MemoGrafterConfigSource

TypeScript contract for MemoGrafterConfigSource.

What it does

TypeScript contract for MemoGrafterConfigSource.

Use MemoGrafterConfigSource to keep application code aligned with the values MemoGrafter accepts or returns at this boundary. It is a TypeScript-only contract and adds no runtime behavior.

Definition

TypeScript
type MemoGrafterConfigSource =
  | MemoGrafterProjectConfig
  | (() => MemoGrafterProjectConfig | Promise<MemoGrafterProjectConfig>);

Result

A compile-time-only TypeScript contract with no runtime value.

Example

example.ts
import type { MemoGrafterConfigSource } from "memo-grafter";

function useValue(value: MemoGrafterConfigSource) {
  return value;
}

Important behavior

Use import type when the contract is not needed at runtime.