babel-plugin-parameter-decorator icon indicating copy to clipboard operation
babel-plugin-parameter-decorator copied to clipboard

Support object literal method parameters

Open cneuwirt opened this issue 4 years ago • 0 comments

I have existing code that uses an alternate definition of a class as demonstrated below.

function optional(target, methodName, paramIndex) {}

const Hello = Base.extend({ greet(@optional name) {} });

When applying this plugin, the generated code tries to access Hello.prototype which doesn't exist at that time. Is it possible to make it behave like the @babel/plugin-proposal-decorators plugin works on object literals?

thanks

cneuwirt avatar May 31 '20 17:05 cneuwirt