Type Alias SwitchConfigMap<Map, Key>

SwitchConfigMap: Record<Key, Partial<Record<keyof Map, string>>>

ConfigMap, this is a helper type to define the configuration map for the switch loader.

Type Parameters

  • Map extends Record<string, unknown>

    The configuration map

  • Key extends string

    The key to switch between

v0.10.1

type TestConfigMapEnv = { DEMO: string; ANOTHER: string; };
const switchConfigMap: SwitchConfigMap<TestConfigMapEnv, 'switch1' | 'switch2'> = {
switch1: { DEMO: 'value' },
switch2: { DEMO: 'value2' },
};