File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var callBound = require ( 'call-bind/callBound ' ) ;
3
+ var callBound = require ( 'call-bound ' ) ;
4
4
var $then = callBound ( 'Promise.prototype.then' , true ) ;
5
5
6
6
var pFalse = $then && Promise . resolve ( false ) ;
@@ -31,6 +31,7 @@ module.exports = function hasDynamicImport() {
31
31
32
32
return $then ( promise , thunkTrue , thunkFalse ) ;
33
33
} catch ( e ) {
34
- return pFalse ;
34
+ // eslint-disable-next-line no-extra-parens
35
+ return /** @type {NonNullable<typeof pFalse> } */ ( pFalse ) ;
35
36
}
36
37
} ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var callBound = require ( 'call-bind/callBound ' ) ;
3
+ var callBound = require ( 'call-bound ' ) ;
4
4
var callBind = require ( 'call-bind' ) ;
5
5
var GetIntrinsic = require ( 'get-intrinsic' ) ;
6
6
var $then = callBound ( 'Promise.prototype.then' , true ) ;
@@ -41,6 +41,7 @@ module.exports = function hasDynamicImport() {
41
41
42
42
return $then ( importWrapper ( ) , thunkTrue , thunkFalse ) ;
43
43
} catch ( e ) {
44
- return $resolve ( false ) ;
44
+ // eslint-disable-next-line no-extra-parens
45
+ return /** @type {Promise<false> } */ ( /** @type {NonNullable<typeof $resolve> } */ ( $resolve ) ( false ) ) ;
45
46
}
46
47
} ;
Original file line number Diff line number Diff line change 94
94
},
95
95
"dependencies" : {
96
96
"call-bind" : " ^1.0.8" ,
97
+ "call-bound" : " ^1.0.3" ,
97
98
"get-intrinsic" : " ^1.2.6"
98
99
},
99
100
"testling" : {
You can’t perform that action at this time.
0 commit comments