MCPcopy Create free account
hub / github.com/BCsabaEngine/svelteesp32 / validateEngine

Function validateEngine

src/commandLine.ts:118–124  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

116}
117
118function validateEngine(value: string): 'psychic' | 'async' | 'espidf' | 'webserver' {
119 if (['psychic', 'async', 'espidf', 'webserver'].includes(value))
120 return value as 'psychic' | 'async' | 'espidf' | 'webserver';
121
122 console.error(getInvalidEngineError(value));
123 process.exit(1);
124}
125
126function validateTriState(value: string, name: string): 'always' | 'never' | 'compiler' {
127 if (['always', 'never', 'compiler'].includes(value)) return value as 'always' | 'never' | 'compiler';

Callers 3

validateRcConfigFunction · 0.85
applyFlagFunction · 0.85
parseArgumentsFunction · 0.85

Calls 1

getInvalidEngineErrorFunction · 0.90

Tested by

no test coverage detected