55 * Use of this source code is governed by an MIT-style license that can be
66 * found in the LICENSE file at https://angular.io/license
77 */
8- interface Promise < T > {
9- finally < U > ( onFinally ?: ( ) => U | PromiseLike < U > ) : Promise < T > ;
10- }
11-
128Zone . __load_patch ( 'ZoneAwarePromise' , ( global : any , Zone : ZoneType , api : _ZonePrivate ) => {
139 const ObjectGetOwnPropertyDescriptor = Object . getOwnPropertyDescriptor ;
1410 const ObjectDefineProperty = Object . defineProperty ;
@@ -146,7 +142,7 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr
146142 if ( state !== REJECTED && value instanceof ZoneAwarePromise &&
147143 value . hasOwnProperty ( symbolState ) && value . hasOwnProperty ( symbolValue ) &&
148144 ( value as any ) [ symbolState ] !== UNRESOLVED ) {
149- clearRejectedNoCatch ( < Promise < any > > value ) ;
145+ clearRejectedNoCatch ( < Promise < any > > value as any ) ;
150146 resolvePromise ( promise , ( value as any ) [ symbolState ] , ( value as any ) [ symbolValue ] ) ;
151147 } else if ( state !== REJECTED && typeof then === 'function' ) {
152148 try {
@@ -379,7 +375,7 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr
379375 if ( ( this as any ) [ symbolState ] == UNRESOLVED ) {
380376 ( < any [ ] > ( this as any ) [ symbolValue ] ) . push ( zone , chainPromise , onFulfilled , onRejected ) ;
381377 } else {
382- scheduleResolveOrReject ( this , zone , chainPromise , onFulfilled , onRejected ) ;
378+ scheduleResolveOrReject ( this , zone , chainPromise as any , onFulfilled , onRejected ) ;
383379 }
384380 return chainPromise ;
385381 }
@@ -397,7 +393,7 @@ Zone.__load_patch('ZoneAwarePromise', (global: any, Zone: ZoneType, api: _ZonePr
397393 if ( ( this as any ) [ symbolState ] == UNRESOLVED ) {
398394 ( < any [ ] > ( this as any ) [ symbolValue ] ) . push ( zone , chainPromise , onFinally , onFinally ) ;
399395 } else {
400- scheduleResolveOrReject ( this , zone , chainPromise , onFinally , onFinally ) ;
396+ scheduleResolveOrReject ( this , zone , chainPromise as any , onFinally , onFinally ) ;
401397 }
402398 return chainPromise ;
403399 }
0 commit comments