Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix sorting in the vm.Module section #21931

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,71 +234,6 @@ exception due to possible ambiguity with `throw undefined;`.
Corresponds to the `[[EvaluationError]]` field of [Source Text Module Record][]s
in the ECMAScript specification.

### module.linkingStatus

* {string}

The current linking status of `module`. It will be one of the following values:

- `'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'`: `module.link()` has been called, and all its dependencies have
been successfully linked.
- `'errored'`: `module.link()` has been called, but at least one of its
dependencies failed to link, either because the callback returned a `Promise`
that is rejected, or because the `Module` the callback returned is invalid.

### module.namespace

* {Object}

The namespace object of the module. This is only available after instantiation
(`module.instantiate()`) has completed.

Corresponds to the [GetModuleNamespace][] abstract operation in the ECMAScript
specification.

### module.status

* {string}

The current status of the module. Will be one of:

- `'uninstantiated'`: The module is not instantiated. It may because of any of
the following reasons:

- The module was just created.
- `module.instantiate()` has been called on this module, but it failed for
some reason.

This status does not convey any information regarding if `module.link()` has
been called. See `module.linkingStatus` for that.

- `'instantiating'`: The module is currently being instantiated through a
`module.instantiate()` call on itself or a parent module.

- `'instantiated'`: The module has been instantiated successfully, but
`module.evaluate()` has not yet been called.

- `'evaluating'`: The module is being evaluated through a `module.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
[Source Text Module Record][]'s `[[Status]]` field. `'errored'` corresponds to
`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
value that is not `undefined`.

### module.url

* {string}

The URL of the current module, as set in the constructor.

### module.evaluate([options])

* `options` {Object}
Expand Down Expand Up @@ -395,6 +330,71 @@ that point all modules would have been fully linked already, the
[HostResolveImportedModule][] implementation is fully synchronous per
specification.

### module.linkingStatus

* {string}

The current linking status of `module`. It will be one of the following values:

- `'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'`: `module.link()` has been called, and all its dependencies have
been successfully linked.
- `'errored'`: `module.link()` has been called, but at least one of its
dependencies failed to link, either because the callback returned a `Promise`
that is rejected, or because the `Module` the callback returned is invalid.

### module.namespace

* {Object}

The namespace object of the module. This is only available after instantiation
(`module.instantiate()`) has completed.

Corresponds to the [GetModuleNamespace][] abstract operation in the ECMAScript
specification.

### module.status

* {string}

The current status of the module. Will be one of:

- `'uninstantiated'`: The module is not instantiated. It may because of any of
the following reasons:

- The module was just created.
- `module.instantiate()` has been called on this module, but it failed for
some reason.

This status does not convey any information regarding if `module.link()` has
been called. See `module.linkingStatus` for that.

- `'instantiating'`: The module is currently being instantiated through a
`module.instantiate()` call on itself or a parent module.

- `'instantiated'`: The module has been instantiated successfully, but
`module.evaluate()` has not yet been called.

- `'evaluating'`: The module is being evaluated through a `module.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
[Source Text Module Record][]'s `[[Status]]` field. `'errored'` corresponds to
`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
value that is not `undefined`.

### module.url

* {string}

The URL of the current module, as set in the constructor.

## Class: vm.Script
<!-- YAML
added: v0.3.1
Expand Down