* Throws user error if `service` is null. * @param {object} service * @param {string} id * @param {string} extension * @return {!Object} * @private * @closurePrimitive {asserts.matchesReturn}
(service, id, extension)
| 147 | * @closurePrimitive {asserts.matchesReturn} |
| 148 | */ |
| 149 | function assertService(service, id, extension) { |
| 150 | return /** @type {!Object} */ ( |
| 151 | userAssert( |
| 152 | service, |
| 153 | 'Service %s was requested to be provided through %s, ' + |
| 154 | 'but %s is not loaded in the current page. To fix this ' + |
| 155 | 'problem load the JavaScript file for %s in this page.', |
| 156 | id, |
| 157 | extension, |
| 158 | extension, |
| 159 | extension |
| 160 | ) |
| 161 | ); |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Returns the promise for service with `id` on the given window if available. |
no test coverage detected