更新时间:2023-12-06 08:08:16
可以在指令序言(JavaScript引擎可能使用的部分)中的更多示例:
Some more examples that can be in the "directive prologue" (a section potentially usable by JavaScript engines):
'use strict';
'use asm';
'使用更严格';
'use strict';
'use asm';
'use stricter';
'use stricter+types';
推文 Jeremy Ashkenas 建议进一步使用 +
和 -
前缀相同'使用...';
字符串('使用更严格+ types -tco + jsx + asm + es2019-pre';
),但这似乎与规范(在 kangax的答案中进一步澄清, Bergi的回答)。
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).