(fn: Function)
| 612 | api.patchThen = patchThen; |
| 613 | |
| 614 | function zoneify(fn: Function) { |
| 615 | return function (self: any, args: any[]) { |
| 616 | let resultPromise = fn.apply(self, args); |
| 617 | if (resultPromise instanceof ZoneAwarePromise) { |
| 618 | return resultPromise; |
| 619 | } |
| 620 | let ctor = resultPromise.constructor; |
| 621 | if (!ctor[symbolThenPatched]) { |
| 622 | patchThen(ctor); |
| 623 | } |
| 624 | return resultPromise; |
| 625 | }; |
| 626 | } |
| 627 | |
| 628 | if (NativePromise) { |
| 629 | patchThen(NativePromise); |
no test coverage detected
searching dependent graphs…