module.status
模块的当前状态。 将是以下之一:
-
'unlinked'
:module.link()
还没有被调用。 -
'linking'
:module.link()
已被调用,但链接器函数返回的 Promise 尚未全部解决。 -
'linked'
: 模块已成功链接,其所有依赖都已链接,但尚未调用module.evaluate()
。 -
'evaluating'
: 该模块正在通过自身或父模块上的module.evaluate()
进行评估。 -
'evaluated'
: 模块已成功评估。 -
'errored'
: 模块已被评估,但抛出异常。
除了 'errored'
,此状态字符串对应于规范的循环模块记录的 [[Status]]
字段。
'errored'
对应于规范中的 'evaluated'
,但 [[EvaluationError]]
设置为不是 undefined
的值。
The current status of the module. Will be one of:
-
'unlinked'
:module.link()
has not yet been called. -
'linking'
:module.link()
has been called, but not all Promises returned by the linker function have been resolved yet. -
'linked'
: The module has been linked successfully, and all of its dependencies are linked, butmodule.evaluate()
has not yet been called. -
'evaluating'
: The module is being evaluated through amodule.evaluate()
on itself or a parent module. -
'evaluated'
: The module has been successfully evaluated. -
'errored'
: The module has been evaluated, but an exception was thrown.
Other than 'errored'
, this status string corresponds to the specification's
Cyclic Module Record's [[Status]]
field. 'errored'
corresponds to
'evaluated'
in the specification, but with [[EvaluationError]]
set to a
value that is not undefined
.