refactor: ensure zone.js can be built with typescript strict flag (#30993)
As part of FW-1265, the `zone.js` package is made compatible with the TypeScript `--strict` flag. Read more about the strict flag [here](https://www.typescriptlang.org/docs/handbook/compiler-options.html) PR Close #30993
This commit is contained in:

committed by
Miško Hevery

parent
10a1e1974b
commit
60f58bf051
@ -45,7 +45,7 @@ Zone.__load_patch('promisefortest', (global: any, Zone: ZoneType, api: _ZonePriv
|
||||
oriThen = (Promise as any)[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
|
||||
Promise.prototype.then = function() {
|
||||
const chained = oriThen.apply(this, arguments);
|
||||
if (this[symbolState] === UNRESOLVED) {
|
||||
if ((this as any)[symbolState] === UNRESOLVED) {
|
||||
// parent promise is unresolved.
|
||||
const asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
|
||||
if (asyncTestZoneSpec) {
|
||||
@ -65,4 +65,4 @@ Zone.__load_patch('promisefortest', (global: any, Zone: ZoneType, api: _ZonePriv
|
||||
(Promise as any)[Zone.__symbol__('ZonePromiseThen')] = undefined;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user