Skip to content

Improve branding on descriptors #56

@littledan

Description

@littledan

Right now, the only way to tell if a class descriptor, method descriptor or field descriptor is that or another object is to read its properties and see if it kinda looks like a descriptor (e.g., does it have a type property). To make overloading easier and more reliable, we should brand them. We can do this through an own @@toStringTag property that identifies these as "Class Descriptor", "Method Descriptor" and "Field Descriptor". This should resolve tc39/proposal-decorators-previous#24 .

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