Skip to content

[Feature Request]: Add promise resolving in REPLΒ #38921

@zemse

Description

@zemse

Description

Currently when using REPL for debugging some library's async methods is painful

> asyncTaskThatResolvesNumber();
Promise<pending>

// nodejs repl
> await asyncTaskThatResolvesNumber();
await asyncTaskThatResolvesNumber()
^^^^^

Current workaround is

> asyncTaskThatResolvesNumber().then(console.log)
123

Desired Behaviour

Chrome's console handles the case as follows.

> asyncTaskThatResolvesNumber();
Promise<pending>

// chrome console
> await asyncTaskThatResolvesNumber();
123

It'd be very helpful if we can do that in NodeJs REPL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions