Besides use strict
, which other use
directives are there?
Some more examples that can be in the “directive prologue” (a section potentially usable by JavaScript engines):
'use strict';
'use asm';
'use stricter';
'use stricter+types';
'use babel';
'use 6to5';
)A tweet by Jeremy Ashkenas suggests some further use of +
and -
prefixes in the same 'use ...';
string ('use stricter +types -tco +jsx +asm +es2019-pre';
), but that seems to contradict the spec (further clarified in kangax's answer and Bergi's answer).