Skip to content

Commit a113468

Browse files
authored
doc: link to dynamic import function
PR-URL: #42634 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
1 parent 2d84620 commit a113468

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

doc/api/crypto.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ a preload module).
5959

6060
When using ESM, if there is a chance that the code may be run on a build
6161
of Node.js where crypto support is not enabled, consider using the
62-
`import()` function instead of the lexical `import` keyword:
62+
[`import()`][] function instead of the lexical `import` keyword:
6363

6464
```mjs
6565
let crypto;
@@ -6142,6 +6142,7 @@ See the [list of SSL OP Flags][] for details.
61426142
[`hash.update()`]: #hashupdatedata-inputencoding
61436143
[`hmac.digest()`]: #hmacdigestencoding
61446144
[`hmac.update()`]: #hmacupdatedata-inputencoding
6145+
[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports
61456146
[`keyObject.export()`]: #keyobjectexportoptions
61466147
[`postMessage()`]: worker_threads.md#portpostmessagevalue-transferlist
61476148
[`sign.sign()`]: #signsignprivatekey-outputencoding

doc/api/http2.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ a preload module).
5454

5555
When using ESM, if there is a chance that the code may be run on a build
5656
of Node.js where crypto support is not enabled, consider using the
57-
`import()` function instead of the lexical `import` keyword:
57+
[`import()`][] function instead of the lexical `import` keyword:
5858

5959
```mjs
6060
let http2;
@@ -4143,6 +4143,7 @@ you need to implement any fall-back behavior yourself.
41434143
[`http2.createServer()`]: #http2createserveroptions-onrequesthandler
41444144
[`http2session.close()`]: #http2sessionclosecallback
41454145
[`http2stream.pushStream()`]: #http2streampushstreamheaders-options-callback
4146+
[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports
41464147
[`net.Server.close()`]: net.md#serverclosecallback
41474148
[`net.Socket.bufferSize`]: net.md#socketbuffersize
41484149
[`net.Socket.prototype.ref()`]: net.md#socketref

doc/api/https.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ a preload module).
3535

3636
When using ESM, if there is a chance that the code may be run on a build
3737
of Node.js where crypto support is not enabled, consider using the
38-
`import()` function instead of the lexical `import` keyword:
38+
[`import()`][] function instead of the lexical `import` keyword:
3939

4040
```mjs
4141
let https;
@@ -536,6 +536,7 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
536536
[`http.request()`]: http.md#httprequestoptions-callback
537537
[`https.Agent`]: #class-httpsagent
538538
[`https.request()`]: #httpsrequestoptions-callback
539+
[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports
539540
[`net.Server`]: net.md#class-netserver
540541
[`new URL()`]: url.md#new-urlinput-base
541542
[`server.listen()`]: net.md#serverlisten

doc/api/tls.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ a preload module).
4040

4141
When using ESM, if there is a chance that the code may be run on a build
4242
of Node.js where crypto support is not enabled, consider using the
43-
`import()` function instead of the lexical `import` keyword:
43+
[`import()`][] function instead of the lexical `import` keyword:
4444

4545
```mjs
4646
let tls;
@@ -2235,6 +2235,7 @@ added: v11.4.0
22352235
[`SSL_export_keying_material`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html
22362236
[`SSL_get_version`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html
22372237
[`crypto.getCurves()`]: crypto.md#cryptogetcurves
2238+
[`import()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports
22382239
[`net.Server.address()`]: net.md#serveraddress
22392240
[`net.Server`]: net.md#class-netserver
22402241
[`net.Socket`]: net.md#class-netsocket

0 commit comments

Comments
 (0)