(
options: PromiseResourceOptions<T, R> & {debugName?: string},
)
| 579 | } |
| 580 | |
| 581 | function createLoader<T, R>( |
| 582 | options: PromiseResourceOptions<T, R> & {debugName?: string}, |
| 583 | ): ResourceStreamingLoader<T, R> { |
| 584 | return async (params) => { |
| 585 | try { |
| 586 | return signal( |
| 587 | {value: await options.loader(params)}, |
| 588 | ngDevMode ? createDebugNameObject(options.debugName, 'stream') : undefined, |
| 589 | ); |
| 590 | } catch (err) { |
| 591 | return signal( |
| 592 | {error: encapsulateResourceError(err)}, |
| 593 | ngDevMode ? createDebugNameObject(options.debugName, 'stream') : undefined, |
| 594 | ); |
| 595 | } |
| 596 | }; |
| 597 | } |
| 598 | |
| 599 | function isStreamingResourceOptions<T, R>( |
| 600 | options: ResourceOptions<T, R>, |
no test coverage detected