MCPcopy Index your code
hub / github.com/coder/coder / coerceConcrete

Function coerceConcrete

site/src/theme/themeMode.ts:38–41  ·  view source on GitHub ↗
(
	value: string | undefined,
	fallback: ConcreteThemeName,
)

Source from the content-addressed store, hash-verified

36};
37
38const coerceConcrete = (
39 value: string | undefined,
40 fallback: ConcreteThemeName,
41): ConcreteThemeName => (isConcreteThemeName(value) ? value : fallback);
42
43/**
44 * Maps every concrete theme to its opposite-scheme counterpart in the

Callers 2

migrateLegacyPreferenceFunction · 0.85
draftFromStateFunction · 0.85

Calls 1

isConcreteThemeNameFunction · 0.85

Tested by

no test coverage detected