File tree 7 files changed +33
-9
lines changed
7 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,18 @@ module.exports = exported || function isSet(x) {
31
31
return false ;
32
32
}
33
33
try {
34
- $setHas . call ( x ) ;
35
- if ( $mapHas ) {
36
- try {
37
- $mapHas . call ( x ) ;
38
- } catch ( e ) {
39
- return true ;
34
+ if ( $setHas ) {
35
+ $setHas . call ( x , 0 ) ;
36
+ if ( $mapHas ) {
37
+ try {
38
+ $mapHas . call ( x , 0 ) ;
39
+ } catch ( e ) {
40
+ return true ;
41
+ }
40
42
}
43
+ // @ts -expect-error TS can't figure out that $Set is always truthy here
44
+ return x instanceof $Set ; // core-js workaround, pre-v2.5.0
41
45
}
42
- // @ts -expect-error TS can't figure out that $Set is always truthy here
43
- return x instanceof $Set ; // core-js workaround, pre-v2.5.0
44
46
} catch ( e ) { }
45
47
return false ;
46
48
} ;
Original file line number Diff line number Diff line change 76
76
},
77
77
"publishConfig" : {
78
78
"ignore" : [
79
- " .github/workflows"
79
+ " .github/workflows" ,
80
+ " types"
80
81
]
81
82
},
82
83
"testling" : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " @ljharb/tsconfig" ,
3
+ "compilerOptions" : {
4
+ "maxNodeModuleJsDepth" : 0 ,
5
+ },
3
6
"exclude" : [
4
7
" coverage" ,
5
8
],
Original file line number Diff line number Diff line change
1
+ declare module 'es-set/implementation' {
2
+ export = SetConstructor ;
3
+ }
Original file line number Diff line number Diff line change
1
+ declare module 'es-set' {
2
+ const Set : SetConstructor ;
3
+
4
+ export = Set ;
5
+ }
Original file line number Diff line number Diff line change
1
+ declare module 'es-set/polyfill' {
2
+ function getPolyfill ( ) : SetConstructor ;
3
+
4
+ export = getPolyfill ;
5
+ }
Original file line number Diff line number Diff line change
1
+ declare module 'es-set/shim' {
2
+ function shim ( ) : SetConstructor ;
3
+
4
+ export = shim ;
5
+ }
You can’t perform that action at this time.
0 commit comments