swc_ecma_compat_es3

Function reserved_words

source
pub fn reserved_words(preserve_import: bool) -> impl Pass
Expand description

babel: @babel/plugin-transform-reserved-words

Some words were reserved in ES3 as potential future keywords but were not reserved in ES5 and later. This plugin, to be used when targeting ES3 environments, renames variables from that set of words.

§Input

var abstract = 1;
var x = abstract + 1;

§Output

var _abstract = 1;
var x = _abstract + 1;