(name: string, options?: BooleanDefOptions)
| 108 | |
| 109 | export type BooleanDefOptions = BooleanInputOptions |
| 110 | export const booleanDef = (name: string, options?: BooleanDefOptions): InputDefinition<boolean> => { |
| 111 | const buildFromUserInput = async (): Promise<boolean> => booleanInput(name, options) |
| 112 | const summarizeForEdit = (value: boolean): string => value ? 'Yes' : 'No' |
| 113 | const updateFromUserInput = async (original: boolean): Promise<boolean> => booleanInput(name, { default: original }) |
| 114 | |
| 115 | return { name, buildFromUserInput, summarizeForEdit, updateFromUserInput } |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Use a static definition if you only need a hard-coded value for a given field. The user will |
no outgoing calls
no test coverage detected