babel-plugin-parameter-decorator
babel-plugin-parameter-decorator copied to clipboard
Support object literal method parameters
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