Skip to content

access decorated class from itself #79

Description

@mixtur

When you have decorated class, from inside that class should you be able to access decorated or original version of it?

For example.

const decorator = (x) => {
    console.log('test');
    return x;
};

@decorator
class A {
    foo() {
        return new A();
    }
}

const a = new A();//this invokes console.log
const b = a.foo();// maybe this should too?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions