From 802d088834cd15062e1a05eda56cacfc3eac60ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 9 Apr 2022 13:41:30 +0200 Subject: [PATCH] doc: link to dynamic import function PR-URL: https://github.com/nodejs/node/pull/42634 Reviewed-By: Paolo Insogna Reviewed-By: Darshan Sen Reviewed-By: Akhil Marsonya --- doc/api/crypto.md | 3 ++- doc/api/http2.md | 3 ++- doc/api/https.md | 3 ++- doc/api/tls.md | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ad762efb50fef8..dba06c7fa86f96 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -59,7 +59,7 @@ a preload module). When using ESM, if there is a chance that the code may be run on a build of Node.js where crypto support is not enabled, consider using the -`import()` function instead of the lexical `import` keyword: +[`import()`][] function instead of the lexical `import` keyword: ```mjs let crypto; @@ -6034,6 +6034,7 @@ See the [list of SSL OP Flags][] for details. [`hash.update()`]: #hashupdatedata-inputencoding [`hmac.digest()`]: #hmacdigestencoding [`hmac.update()`]: #hmacupdatedata-inputencoding +[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports [`keyObject.export()`]: #keyobjectexportoptions [`postMessage()`]: worker_threads.md#portpostmessagevalue-transferlist [`sign.sign()`]: #signsignprivatekey-outputencoding diff --git a/doc/api/http2.md b/doc/api/http2.md index e4a55208d02a8d..ea09de3431bc17 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -52,7 +52,7 @@ a preload module). When using ESM, if there is a chance that the code may be run on a build of Node.js where crypto support is not enabled, consider using the -`import()` function instead of the lexical `import` keyword: +[`import()`][] function instead of the lexical `import` keyword: ```mjs let http2; @@ -4080,6 +4080,7 @@ you need to implement any fall-back behavior yourself. [`http2.createServer()`]: #http2createserveroptions-onrequesthandler [`http2session.close()`]: #http2sessionclosecallback [`http2stream.pushStream()`]: #http2streampushstreamheaders-options-callback +[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports [`net.Server.close()`]: net.md#serverclosecallback [`net.Socket.bufferSize`]: net.md#socketbuffersize [`net.Socket.prototype.ref()`]: net.md#socketref diff --git a/doc/api/https.md b/doc/api/https.md index 52507a9648526e..ae3dc46c898e53 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -35,7 +35,7 @@ a preload module). When using ESM, if there is a chance that the code may be run on a build of Node.js where crypto support is not enabled, consider using the -`import()` function instead of the lexical `import` keyword: +[`import()`][] function instead of the lexical `import` keyword: ```mjs let https; @@ -534,6 +534,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p [`http.request()`]: http.md#httprequestoptions-callback [`https.Agent`]: #class-httpsagent [`https.request()`]: #httpsrequestoptions-callback +[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports [`net.Server`]: net.md#class-netserver [`new URL()`]: url.md#new-urlinput-base [`server.listen()`]: net.md#serverlisten diff --git a/doc/api/tls.md b/doc/api/tls.md index ee4a810b015b0a..769d34a36e7fd4 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -40,7 +40,7 @@ a preload module). When using ESM, if there is a chance that the code may be run on a build of Node.js where crypto support is not enabled, consider using the -`import()` function instead of the lexical `import` keyword: +[`import()`][] function instead of the lexical `import` keyword: ```mjs let tls; @@ -2221,6 +2221,7 @@ added: v11.4.0 [`SSL_export_keying_material`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html [`SSL_get_version`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html [`crypto.getCurves()`]: crypto.md#cryptogetcurves +[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports [`net.Server.address()`]: net.md#serveraddress [`net.Server`]: net.md#class-netserver [`net.Socket`]: net.md#class-netsocket