MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / staticDef

Function staticDef

src/lib/item-input/misc.ts:122–127  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

120 * never be asked or notified and the value specified will be used.
121 */
122export const staticDef = <T>(value: T): InputDefinition<T> => {
123 const buildFromUserInput = async (): Promise<T> => value
124 const summarizeForEdit = (): Uneditable => uneditable
125 const updateFromUserInput = async (): Promise<T> => value
126 return { name: 'unused', buildFromUserInput, summarizeForEdit, updateFromUserInput }
127}
128
129export const undefinedDef = staticDef(undefined)
130

Callers 6

buildInputDefinitionFunction · 0.85
organizationDefFunction · 0.85
misc.tsFile · 0.85
misc.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected