(response: Response)
| 208 | } |
| 209 | |
| 210 | function streamHandler(response: Response): void { |
| 211 | // clone response for awaiting stream |
| 212 | let clonedResponseForResolving: Response; |
| 213 | try { |
| 214 | clonedResponseForResolving = response.clone(); |
| 215 | } catch { |
| 216 | return; |
| 217 | } |
| 218 | |
| 219 | // eslint-disable-next-line @typescript-eslint/no-floating-promises |
| 220 | resolveResponse(clonedResponseForResolving, () => { |
| 221 | triggerHandlers('fetch-body-resolved', { |
| 222 | endTimestamp: timestampInSeconds() * 1000, |
| 223 | response, |
| 224 | }); |
| 225 | }); |
| 226 | } |
| 227 | |
| 228 | function hasProp<T extends string>(obj: unknown, prop: T): obj is Record<string, string> { |
| 229 | return !!obj && typeof obj === 'object' && !!(obj as Record<string, string>)[prop]; |
nothing calls this directly
no test coverage detected