javascript ESNext 是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/56521178/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 10:38:06  来源:igfitidea点击:

What is ESNext?

javascriptecmascript-next

提问by Aaditya Sharma

I've come across the term ESNext, and wondering it is the same as the ECMAScript.

我遇到了术语ESNext,并想知道它与 ECMAScript 相同。

So, I have these questions here:

所以,我在这里有这些问题:

  • What is ESNext, actually?
  • Does it refer to any specific version of ECMAScript?
  • ESNext 到底是什么?
  • 它是指 ECMAScript 的任何特定版本吗?

回答by T.J. Crowder

What is ESNext, actually?

ESNext 到底是什么?

It varies depending on who's using the term, usually "the next" version of ECMAScript (JavaScript). For instance, when I first wrote this answer in June 2019, if someone said "ESNext" they might be talking about ES2019 plus BigInt, dynamic import, and other features that had recently reached Stage 4 of the process, or they might even have been talking about those plus some advanced Stage 3 proposals. As of this update in April 2020, they'd be talking about the recently-agreed ES2020 and perhaps things like top-level await, WeakRefs, and logical assignment operators. It varies.

它因使用该术语的人而异,通常是 ECMAScript (JavaScript) 的“下一个”版本。例如,当我在 2019 年 6 月第一次写这个答案时,如果有人说“ESNext”,他们可能是在谈论 ES2019 加上 BigInt、动态导入和其他最近达到过程第 4 阶段的功能,或者他们甚至可能已经谈论那些以及一些高级的第 3 阶段提案。截至 2020 年 4 月的此更新,他们将讨论最近商定的 ES2020 以及顶级await、WeakRefs 和逻辑赋值运算符等内容。它因人而异。

Does it refer to any specific version of EcmaScript?

它是指 EcmaScript 的任何特定版本吗?

No, it usually refers to a constantly moving target just beyond the current snapshot specification.

不,它通常指的是刚好超出当前快照规范的不断移动的目标。

But again, it varies a bit by who's using it.

但同样,它因使用它的人而有所不同。

回答by nmak18

ESNext is a name that always indicates the next version of JavaScript.

ESNext 是一个始终表示 JavaScript 下一个版本的名称。

The current ECMAScript version is ES2018. It was released in June 2018.

当前的 ECMAScript 版本是 ES2018。它于2018年6月发布。

Proposals to the ECMAScript standard are organized in stages. Stages 1–3 are an incubator of new features, and features reaching Stage 4 are finalized as part of the new standard.

ECMAScript 标准的提案是分阶段组织的。第 1-3 阶段是新功能的孵化器,达到第 4 阶段的功能将作为新标准的一部分最终确定。

回答by Robin

ES.Next is a dynamic name that refers to whatever the next version is at time of writing. ES.Next features are more correctly called proposals, because, by definition, the specification has not been finalized yet. Many features that are a “part” of ES.Next were not even proposed during the work on ES6. Indeed, as a living language, ECMAScript / JavaScript is constantly evolving and being enhanced, and new proposals are continuously being added into ES.Next.

ES.Next 是一个动态名称,指的是编写时下一个版本的任何内容。ES.Next 功能更准确地称为提案,因为根据定义,规范尚未最终确定。在 ES6 的工作中甚至没有提出作为 ES.Next 的“一部分”的许多功能。的确,作为一种活的语言,ECMAScript/JavaScript 也在不断地发展和增强,新的提案也在不断地被添加到 ES.Next 中。

Source : Quora

来源:知乎