-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor to TypeScript #1101
Comments
I'm happy to review PRs starting on the new packages. I wanted to add TS, just doesn't have the time. |
With a progressive strategy and a nice roadmap, this could be done. |
The first stab is launched over #1112 - there's a fair amount of work, but I explained which files to focus on there. We can do them one by one! |
Yep, you should create a new branch for TypeScript. |
Nevermind, looks like you already did 😅 |
@SBoudrias I'll be working on packages/core/src/lib/screen-manager.js. |
@SBoudrias I'd like to help migrate the other packages. Can I work on @inquirer/password and @inquirer/select and others if they are free as well? I'll take @inquirer/checkbox as a reference |
@TDP17 that'd be great! I'll leave those to you for at least a week. Feel free to send an incomplete PR if you get stuck somewhere; that way I'll know the progress and can help take the branch over if I want to wrap this up sooner 😄 |
If I want to convert my plugin to typescript https://github.com/mokkabonna/inquirer-autocomplete-prompt is the approach here the way to go? Import from @inquirer/core and use the createprompt? type SelectConfig = AsyncPromptConfig & {
choices: { value: string; name?: string; description?: string; disabled?: boolean }[];
pageSize?: number;
};
export default createPrompt<string, SelectConfig>((config, done) => { |
Hey @mokkabonna, yes that'd be the ideal. One thing to note is that afterward your custom prompt will be usable standalone (which I think overall is better.) But it won't be register-able through |
Ok nice to know. I try to stay as aligned with what you are doing here as I can so I will then probably go down this route as well. |
I'll mark this one as complete since the new package is out and in typescript #1214 |
Refactoring the codebase to TypeScript in my opinion would have a few advantages:
Of course, I understand if TypeScript isn't your thing, but if it is, I'd be happy to make a PR for at least some (if not most) of the packages.
The text was updated successfully, but these errors were encountered: