(obj: Observable<T> | Subscribable<T> | PromiseLike<T> | null | undefined)
| 176 | transform<T>(obj: null | undefined): null; |
| 177 | transform<T>(obj: Observable<T> | Subscribable<T> | PromiseLike<T> | null | undefined): T | null; |
| 178 | transform<T>(obj: Observable<T> | Subscribable<T> | PromiseLike<T> | null | undefined): T | null { |
| 179 | if (!this._obj) { |
| 180 | if (obj) { |
| 181 | try { |
| 182 | // Only call `markForCheck` if the value is updated asynchronously. |
| 183 | // Synchronous updates _during_ subscription should not wastefully mark for check - |
| 184 | // this value is already going to be returned from the transform function. |
| 185 | this.markForCheckOnValueUpdate = false; |
| 186 | this._subscribe(obj); |
| 187 | } finally { |
| 188 | this.markForCheckOnValueUpdate = true; |
| 189 | } |
| 190 | } |
| 191 | return this._latestValue; |
| 192 | } |
| 193 | |
| 194 | if (obj !== this._obj) { |
| 195 | this._dispose(); |
| 196 | return this.transform(obj); |
| 197 | } |
| 198 | |
| 199 | return this._latestValue; |
| 200 | } |
| 201 | |
| 202 | private _subscribe(obj: Subscribable<any> | PromiseLike<any> | EventEmitter<any>): void { |
| 203 | this._obj = obj; |
nothing calls this directly
no test coverage detected