FYI I've changed the ESXToken class and also the transformer to satisfy latest discussions.
The current MR is here: v0.2 with perf and structural changes by WebReflection 路 Pull Request #3 路 ungap/babel-plugin-transform-esx 路 GitHub
The current TS like description is the following:
edit I now have 100% test covered polyfill for the proposal and the only misaligned part is that statics are numbers instead of Symbols, and the name
field for the ESXElement case is still value
. To make relevant classes homogeneous I've used value
instead, but if there's any will to move this forward as ECMAScript implementation I'll be more than happy to add some extra logic to have the name
field for elements too and/or improve the polyfill in general.
However, I must admit I am pretty pleased with how the original idea became actually simpler, yet more structured, still satisfying all requirements around discussions and non-blocking possible improvements (e.g. interpolation also as non spread operations).
As summary, the current ESXToken polyfill and transformer look pretty aligned and "done" at this point, so thanks so far to all participants.
edit2
Showing 3 changed files with 50 additions and 112 deletions.
the latest transformer makes SSR an absolute no-brainer to deal with this split is amazing