-
-
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
inquirer@10.1.6
has a missing type for message
in prompt function
#1495
Comments
Does it work with an array? It's weird because there's multiple tests covering those... Which version of TS are you using? Did you try updating it? |
Wrapping it in an array does not work: I'm using The code works if the type is ignored or if the tests are using a transpile only flag (and not type checking), so perhaps that could be why the tests are passing (I haven't looked at them myself)? Note, my original analysis of how
export interface QuestionMap {
input: typeof input;
select: typeof select;
/** @deprecated `list` is now named `select` */
list: typeof select;
number: typeof number;
confirm: typeof confirm;
rawlist: typeof rawlist;
expand: typeof expand;
checkbox: typeof checkbox;
password: typeof password;
editor: typeof editor;
} |
Not a direct solution to your issue that I didn't have time to investigate (also, weirdly I've been able to migrate another TS codebase successfully to v10 🤷🏻) But, did you consider switching to |
I thought about it for about 5 seconds before I saw "rewrite" and noped out haha. I'll give it a shot later today hopefully |
I moved to |
We released new core types today with |
I have this code:
but the types included in
inquirer@10.1.6
provide an error formessage
(I was sure to uninstall@types/inquirer
during my upgrade from v9):It seems that
message
is missing fromQuestionMap
:Inquirer.js/packages/inquirer/src/types.mts
Lines 29 to 41 in 2cc9e31
but the missing type is being referenced by
PromptConfigMap
:Inquirer.js/packages/inquirer/src/types.mts
Lines 52 to 57 in 2cc9e31
I confirmed that the logic works if I ignore the type:
The text was updated successfully, but these errors were encountered: