WarnerHooh / babel-plugin-parameter-decorator

Function parameter decorator transform plugin for babel v7, just like typescript.
34 stars 9 forks source link

Plugin 2.0 rewrite #32

Open WarnerHooh opened 3 years ago

WarnerHooh commented 3 years ago

Better solution for babel parameter traverse.

We had to deal with various different AST nodes after transpiled by babel presets, even some information were missing like static/private, so we are not able to fix the bug for static methods in the old implementation. The background is babel-presets are always executed before our customized plugin when traversing deeper than ClassExpression.

Now it's much easier to transform parameter decorator with a common way and easier for bug fix.