<vibe-flags />

Types

TypeScript type definitions exported from @vibe-flags/core.

All types are exported from the package entry point:

import type {
  VibeFlagsConfig,
  VibeFlagsConfigBoolean,
  VibeFlagsConfigSelect,
  VibeFlagsValue,
  VibeFlagsState,
} from "@vibe-flags/core";

VibeFlagsConfigBoolean

Configuration for a boolean flag.

interface VibeFlagsConfigBoolean {
  key: string;
  type: "boolean";
  label?: string;
  default?: boolean;
}

VibeFlagsConfigSelect

Configuration for a select flag.

interface VibeFlagsConfigSelect {
  key: string;
  type: "select";
  options: string[];
  label?: string;
  default?: string;
}

VibeFlagsConfig

Union of all flag configuration types.

type VibeFlagsConfig = VibeFlagsConfigBoolean | VibeFlagsConfigSelect;

VibeFlagsValue

The runtime value of any flag.

type VibeFlagsValue = boolean | string;

VibeFlagsState

A map of all flag values, keyed by flag name.

interface VibeFlagsState {
  [key: string]: VibeFlagsValue;
}

On this page