Skip to content
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

missing type: onRender #372

Closed
thilllon opened this issue Oct 21, 2022 · 1 comment · Fixed by #378
Closed

missing type: onRender #372

thilllon opened this issue Oct 21, 2022 · 1 comment · Fixed by #378

Comments

@thilllon
Copy link

thilllon commented Oct 21, 2022

There is a missing type field; onRender. I think this project is no longer maintaine. Mind if I PR to @types/prompts?

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prompts

interface PromptObject<T extends string = string> {
        type: PromptType | Falsy | PrevCaller<T, PromptType | Falsy>;
        name: ValueOrFunc<T>;
        message?: ValueOrFunc<string> | undefined;
        initial?: InitialReturnValue | PrevCaller<T, InitialReturnValue | Promise<InitialReturnValue>> | undefined;
        style?: string | PrevCaller<T, string | Falsy> | undefined;
        format?: PrevCaller<T, void> | undefined;
        validate?: PrevCaller<T, boolean | string | Promise<boolean | string>> | undefined;
        onState?: PrevCaller<T, void> | undefined;

        // must be here
        // onRender?: PrevCaller<T, void> | undefined;

        min?: number | PrevCaller<T, number | Falsy> | undefined;
        max?: number | PrevCaller<T, number | Falsy> | undefined;
        float?: boolean | PrevCaller<T, boolean | Falsy> | undefined;
        round?: number | PrevCaller<T, number | Falsy> | undefined;
        instructions?: string | boolean | undefined;
        increment?: number | PrevCaller<T, number | Falsy> | undefined;
        separator?: string | PrevCaller<T, string | Falsy> | undefined;
        active?: string | PrevCaller<T, string | Falsy> | undefined;
        inactive?: string | PrevCaller<T, string | Falsy> | undefined;
        choices?: Choice[] | PrevCaller<T, Choice[] | Falsy> | undefined;
        hint?: string | PrevCaller<T, string | Falsy> | undefined;
        warn?: string | PrevCaller<T, string | Falsy> | undefined;
        suggest?: ((input: any, choices: Choice[]) => Promise<any>) | undefined;
        limit?: number | PrevCaller<T, number | Falsy> | undefined;
        mask?: string | PrevCaller<T, string | Falsy> | undefined;
        stdout?: Writable | undefined;
        stdin?: Readable | undefined;

    }
@joeykilpatrick
Copy link
Contributor

This issue should be able to be closed with the merge of DefinitelyTyped #63453 two weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants