Skip to content

Commit

Permalink
doc: remove import.meta.resolve parent URL type
Browse files Browse the repository at this point in the history
Support for parent argument of type `URL` was added in #38587, which has
not been backported to previous releases yet.

Update docs for v14.x to remove the URL type for this argument.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

PR-URL: #38585
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
kevinoid authored and targos committed Jun 5, 2021
1 parent d7c590f commit 18eee90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,19 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url));
```
### `import.meta.resolve(specifier[, parent])`
<!--
added:
- v13.9.0
- v12.16.2
-->
> Stability: 1 - Experimental
This feature is only available with the `--experimental-import-meta-resolve`
command flag enabled.
* `specifier` {string} The module specifier to resolve relative to `parent`.
* `parent` {string|URL} The absolute parent module URL to resolve from. If none
* `parent` {string} The absolute parent module URL to resolve from. If none
is specified, the value of `import.meta.url` is used as the default.
* Returns: {Promise}
Expand Down

0 comments on commit 18eee90

Please sign in to comment.