-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
[types] Module '"../node_modules/enquirer"' has no exported member 'MultiSelect' #212
Comments
hmm, not sure why that's broken, thanks for bringing it to our attention. @doowb can you look into the last release to check for regressions? Could it be as simple as a typo (perhaps casing was changed?)?
The sentiment is appreciated, sorry to disappoint. For a whole host of reasons that I'll spare you, I have not personally jumped on the TypeScript bandwagon. However, I'm very open and supportive of contributors adding typings--so PRs would be welcome and appreciated. |
I'll look into it. |
ah ok. then its likely that the typings are out of date and a MultiSelect type never existed. if you confirm i can probably contribuet |
@sw-yx you're right... the MultiSelect type is not in the current typings file. There is this PR that makes a lot of TypeScript changes and adds Since there were some conversations going on in the PR, I'm not sure if it's "complete". Would you be able to do a quick review? If it's something that seems acceptable, I can merge it in and update it for anything new that might be missing. (There have been a few other TypeScript PRs focusing on the current Any other contributions are more than welcome :) |
yea that pr seems kinda stale. i’ll copy over what he has and make a fresh one. happy to help! yall know im a fan. if you dont wanna be bothered by ts issues, the recommendation is actually to let definitelytyped handle it and NOT ship your own typedefs. what do you think about that? a third way exists as well, creating your typings as a standalone module and having the main module require the typings module. this mainly improves dx by requiring one less install and also is nicer for contributors bc we can sidestep definitelytyped. but its more experimental (basically only kentcdodds does it) |
Awesome thank you!
…Sent from my iPhone
On Oct 7, 2019, at 10:49 AM, swyx ***@***.***> wrote:
yea that pr seems kinda stale. i’ll copy over what he has and make a fresh one. happy to help! yall know im a fan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
no really you should consider this:
what's your thought? this affects where I PR types. |
@doowb and have been chatting about this, I meant to reply earlier. I'd prefer to do whatever would provide the best DX -- but we're leaning towards having it in the project, along with a linting and tests, so that we can more easily ensure that everything stays up-to-date and correct. However, since I'm only superficially familiar with TS, I might be asking too much, since we'd need to rely on someone else to help us maintain it. It's also worth mentioning that I'm very close to publishing the next major release of Enquirer, which is a complete refactor. All of the same prompts and options will be there, but I made a lot of improvements to internals. For example, we moved some of the prototype methods into helper functions (called "actions" and "elements"), so that prompts can be more composable. This will also allow mixed content in prompts. So, for example, you'll be able to have a prompt with multiple input fields, some radio buttons, and a checkbox, on a single screen... etc. etc. (There are a few other really exciting features that I'll share when we get closer to release, probably in the next couple of weeks). In any case, the point is that although most of the API and experience will be the same for end-users, the typings will probably need to be handled differently. we'd love to get some help with TS for the next release if that's something you're interested in. |
oh i had no idea! nice. yeah the typings would only cover the public facing API so we wouldnt really care about internals. but it does sound like you're changing the public api. yeah just let me know. i was leaning towards not having the types in here but either way its your call |
I think same is true for |
hey jon, is there something that broke recently with the types? i cant seem to import MultiSelect. when i import
prompt
instead and use atype: 'multiselect'
, thechoices
field doesnt seem to accept an array. whats the status? i might be able to contribute a fix but just figured i would get a general take of the state of typing in this lib. i had expected it would be first class...The text was updated successfully, but these errors were encountered: