Skip to content

Don't use IsPromise #56

@bakkot

Description

@bakkot

IsPromise is an ECMAScript-internal thing. Web specs don't use it, and ECMA-262 only uses it inside of Promise.resolve and Promise.prototype.then. It's not intended for use by host APIs like this.

The more conventional thing would be to either do an actual await unconditionally (which would be my preference), or to check that the result is an object and only await it in that case (if you're really concerned about not having a microtask tick for null, or something).

I can help update the spec text to do the conventional thing if you'd like.

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