(_answers: unknown, input = '')
| 43 | })); |
| 44 | |
| 45 | const searchFunction = async (_answers: unknown, input = '') => { |
| 46 | const fuzzyResult = fuzzy.filter(input, searchItems, { |
| 47 | extract: (item: ProjectSearchItem) => |
| 48 | `${item.organizationName} ${item.name} ${item.id}`, |
| 49 | }); |
| 50 | |
| 51 | return fuzzyResult.map((result: fuzzy.FilterResult<ProjectSearchItem>) => ({ |
| 52 | name: result.original.displayText, |
| 53 | value: result.original, |
| 54 | })); |
| 55 | }; |
| 56 | |
| 57 | const { selectedProject } = (await inquirer.prompt([ |
| 58 | { |