MCPcopy Index your code
hub / github.com/callstack/agent-device / parseAppearanceAction

Function parseAppearanceAction

src/platforms/appearance.ts:5–11  ·  view source on GitHub ↗
(state: string)

Source from the content-addressed store, hash-verified

3export type AppearanceAction = 'light' | 'dark' | 'toggle';
4
5export function parseAppearanceAction(state: string): AppearanceAction {
6 const normalized = state.trim().toLowerCase();
7 if (normalized === 'light') return 'light';
8 if (normalized === 'dark') return 'dark';
9 if (normalized === 'toggle') return 'toggle';
10 throw new AppError('INVALID_ARGS', `Invalid appearance state: ${state}. Use light|dark|toggle.`);
11}

Callers 3

setMacOsAppearanceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected