( command: SmartThingsCommand<OutputListFlags>, config: OutputListConfig<L>, getData: GetDataFunction<L[]>, options?: OutputListOptions, )
| 10 | export type OutputListConfig<L extends object> = FormatAndWriteListConfig<L> |
| 11 | export type OutputListOptions = FormatAndWriteListOptions |
| 12 | export const outputList = async <L extends object>( |
| 13 | command: SmartThingsCommand<OutputListFlags>, |
| 14 | config: OutputListConfig<L>, |
| 15 | getData: GetDataFunction<L[]>, |
| 16 | options?: OutputListOptions, |
| 17 | ): Promise<L[]> => { |
| 18 | const list = config.sortKeyName ? sort(await getData(), config.sortKeyName) : await getData() |
| 19 | await formatAndWriteList(command, config, list, options) |
| 20 | return list |
| 21 | } |
no test coverage detected