(node: null | ComponentStackNode)
| 1148 | export type PostponeInfo = ThrownInfo; |
| 1149 | |
| 1150 | function getThrownInfo(node: null | ComponentStackNode): ThrownInfo { |
| 1151 | const errorInfo: ThrownInfo = {}; |
| 1152 | if (node) { |
| 1153 | Object.defineProperty(errorInfo, 'componentStack', { |
| 1154 | configurable: true, |
| 1155 | enumerable: true, |
| 1156 | get() { |
| 1157 | // Lazyily generate the stack since it's expensive. |
| 1158 | const stack = getStackFromNode(node); |
| 1159 | Object.defineProperty(errorInfo, 'componentStack', { |
| 1160 | value: stack, |
| 1161 | }); |
| 1162 | return stack; |
| 1163 | }, |
| 1164 | }); |
| 1165 | } |
| 1166 | return errorInfo; |
| 1167 | } |
| 1168 | |
| 1169 | function encodeErrorForBoundary( |
| 1170 | boundary: SuspenseBoundary, |
no outgoing calls
no test coverage detected