Skip to Content
Prism UI
Reference

@prismrepo/core

Framework-independent, React-free contracts. Full public export list.

No runtime dependencies, no React dependency, never depends on anything else in the Prism ecosystem.

PrismError

class PrismError extends Error {
  readonly code: string;
  constructor(code: string, message: string, options?: { cause?: unknown });
}

Base error class for everything Prism throws. A real Error subclass with a machine-readable code.

PrismConfigurationError

class PrismConfigurationError extends PrismError {
  constructor(message: string, options?: { cause?: unknown });
}

Thrown when a configuration value that couldn't be checked at compile time (built from untyped/dynamic data) turns out to be invalid at runtime, its code is always "PRISM_CONFIGURATION_ERROR". Thrown by resolveFieldComponent (@prismrepo/forms), defineForm's runtime check, and usePrismRegistry (@prismrepo/react) when called outside a PrismProvider.

Prettify<T>

type Prettify<T> = { [K in keyof T]: T[K] } & {};

Flattens an intersection type into a single object type for cleaner editor hovers and error messages. Type-only, no runtime behavior.

On this page