Custom
You can create your own custom operators by passing customOperators
array to babel plugin config.
Operator signature:
Transform rule transforms the code from AST to AST
Translate rule translates the code from AST to JavaScript
#
ExampleEvery time you use this operator in your code like this:
Before translating to JavaScript it first transforms to:
And translates to JavaScript as: