* Returns a shared `AbortError` reason, since `abort()` without a reason creates a new one (with a * stack trace) on every call, causing performance degradation on deep component trees.
()
| 558 | * stack trace) on every call, causing performance degradation on deep component trees. |
| 559 | */ |
| 560 | function getAbortReason(): DOMException { |
| 561 | return (abortReason ??= new DOMException('The operation was aborted.', 'AbortError')); |
| 562 | } |
| 563 | |
| 564 | function saveToTransferState<R, T>( |
| 565 | result: ResourceStreamItem<T> | undefined, |