Withdrawing custom numeric literal suffixes
Daniel Ehrenberg
Bloomberg
September 2023
TC39 Tokyo
Motivation for proposal
One idea for syntax and semantics
Semantics similar to tagged templates; no relationship to operator overloading
Polyfill for the hypothetical CSS px literal suffix:
function pxSuffix({number}) {
return CSS.px(number)
}
with suffix px = pxSuffix;
3px;
�The last line desugars into:
pxSuffix(Object.freeze({ number: 3, string: "3" }));
Motivation for withdrawing