@@ -116,35 +116,24 @@ Each instance of `AsyncLocalStorage` maintains an independent storage context. |
116 | 116 | Multiple instances can safely exist simultaneously without risk of interfering |
117 | 117 | with each other's data. |
118 | 118 |
|
119 | | -### `new AsyncLocalStorage([options])` |
| 119 | +### `new AsyncLocalStorage()` |
120 | 120 |
|
121 | 121 | <!-- YAML |
122 | 122 | added: |
123 | 123 | - v13.10.0 |
124 | 124 | - v12.17.0 |
125 | 125 | changes: |
| 126 | + - version: REPLACEME |
| 127 | + pr-url: https://github.com/nodejs/node/pull/46386 |
| 128 | + description: Removed experimental onPropagate option. |
126 | 129 | - version: v18.13.0 |
127 | 130 | pr-url: https://github.com/nodejs/node/pull/45386 |
128 | 131 | description: Add option onPropagate. |
129 | 132 | --> |
130 | 133 |
|
131 | | -> Stability: 1 - `options.onPropagate` is experimental. |
132 | | -
|
133 | | -* `options` {Object} |
134 | | - * `onPropagate` {Function} Optional callback invoked before a store is |
135 | | - propagated to a new async resource. Returning `true` allows propagation, |
136 | | - returning `false` avoids it. Default is to propagate always. |
137 | | - |
138 | 134 | Creates a new instance of `AsyncLocalStorage`. Store is only provided within a |
139 | 135 | `run()` call or after an `enterWith()` call. |
140 | 136 |
|
141 | | -The `onPropagate` is called during creation of an async resource. Throwing at |
142 | | -this time will print the stack trace and exit. See |
143 | | -[`async_hooks` Error handling][] for details. |
144 | | - |
145 | | -Creating an async resource within the `onPropagate` callback will result in |
146 | | -a recursive call to `onPropagate`. |
147 | | - |
148 | 137 | ### `asyncLocalStorage.disable()` |
149 | 138 |
|
150 | 139 | <!-- YAML |
@@ -830,5 +819,4 @@ const server = createServer((req, res) => { |
830 | 819 | [`EventEmitter`]: events.md#class-eventemitter |
831 | 820 | [`Stream`]: stream.md#stream |
832 | 821 | [`Worker`]: worker_threads.md#class-worker |
833 | | -[`async_hooks` Error handling]: async_hooks.md#error-handling |
834 | 822 | [`util.promisify()`]: util.md#utilpromisifyoriginal |