Closed AmauryLiet closed 2 years ago
Hello,
First of all thanks for the great inquirer module, it really helps making a great cli experience
I raise the question of TypeScript support, which would make integrating the plugin smoother. Hoping to find time to provide the PR shortly
if anyone is willing to add the type.d.ts file and test the change on its side, here is some base material:
interface FileTreeQuestionOptions<Answers> { type: 'file-tree-selection'; name: keyof Answers; message: string; filter?: (path: string) => Promise<string> | string; validate?: (filteredPath: string, answers: unknown) => boolean; transformer?: (directoryName: string, answers: Answers, context: { isFinal: boolean }) => string; pageSize?: number; onlyShowDir?: boolean; onlyShowValid?: boolean; hideChildrenOfValid?: boolean; root?: string; hideRoot?: boolean; multiple?: boolean; default?: string | string[]; }
(this could be improved by binding multiple & default typings)
Thanks!
Thank you very much! I will add it these days when got time.
@AmauryLiet Hello, typescript is supported in the new release version 1.0.16. More guide is in here
Hello,
First of all thanks for the great inquirer module, it really helps making a great cli experience
I raise the question of TypeScript support, which would make integrating the plugin smoother. Hoping to find time to provide the PR shortly
if anyone is willing to add the type.d.ts file and test the change on its side, here is some base material:
(this could be improved by binding multiple & default typings)
Thanks!