(value: T)
| 172 | } |
| 173 | |
| 174 | async function maybeResolveResources<T>(value: T): Promise<T> { |
| 175 | // In JIT mode we usually resolve the resources of components on bootstrap, however |
| 176 | // that won't have happened for lazy-loaded. Attempt to load any pending |
| 177 | // resources again here. |
| 178 | if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') { |
| 179 | try { |
| 180 | await resolveComponentResources(fetch); |
| 181 | } catch (error) { |
| 182 | console.error(error); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | return value; |
| 187 | } |
no test coverage detected