(compute: (context?: unknown[]) => T)
| 129 | export const undefinedDef = staticDef(undefined) |
| 130 | |
| 131 | export const computedDef = <T>(compute: (context?: unknown[]) => T): InputDefinition<T> => { |
| 132 | const buildFromUserInput = async (context?: unknown[]): Promise<T> => compute(context) |
| 133 | const summarizeForEdit = (): Uneditable => uneditable |
| 134 | // TODO: consider how we might calling this if anything in the context prior to it is edited |
| 135 | const updateFromUserInput = async (_original: T, context?: unknown[]): Promise<T> => compute(context) |
| 136 | // TODO: implement updateIfNeeded |
| 137 | return { name: 'unused', buildFromUserInput, summarizeForEdit, updateFromUserInput } |
| 138 | } |
| 139 | |
| 140 | export type ListSelectionDefOptions<T> = { |
| 141 | /** |
no outgoing calls
no test coverage detected