File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
types/reflect.getprototypeof Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 22
33var forEach = require ( 'for-each' ) ;
44var callBind = require ( 'call-bind' ) ;
5+ var gPO = require ( 'reflect.getprototypeof/polyfill' ) ( ) ;
56
67var typedArrays = require ( 'available-typed-arrays' ) ( ) ;
78
@@ -10,7 +11,6 @@ var typedArrays = require('available-typed-arrays')();
1011
1112/** @type {Object.<typeof typedArrays, ByteOffsetGetter> } */
1213var getters = { } ;
13- var hasProto = require ( 'has-proto' ) ( ) ;
1414
1515var gOPD = require ( 'gopd' ) ;
1616var oDP = Object . defineProperty ;
@@ -25,8 +25,8 @@ if (gOPD) {
2525 var Proto = global [ typedArray ] . prototype ;
2626 // @ts -expect-error TS can't guarantee the callback is invoked sync
2727 var descriptor = gOPD ( Proto , 'byteOffset' ) ;
28- if ( ! descriptor && hasProto ) {
29- var superProto = Proto . __proto__ ; // eslint-disable-line no-proto
28+ if ( ! descriptor ) {
29+ var superProto = gPO ( Proto ) ;
3030 // @ts -expect-error TS can't guarantee the callback is invoked sync
3131 descriptor = gOPD ( superProto , 'byteOffset' ) ;
3232 }
Original file line number Diff line number Diff line change 6262 "for-each" : " ^0.3.3" ,
6363 "gopd" : " ^1.0.1" ,
6464 "has-proto" : " ^1.0.3" ,
65- "is-typed-array" : " ^1.1.13"
65+ "is-typed-array" : " ^1.1.13" ,
66+ "reflect.getprototypeof" : " ^1.0.6"
6667 },
6768 "devDependencies" : {
6869 "@arethetypeswrong/cli" : " ^0.17.0" ,
6970 "@ljharb/eslint-config" : " ^21.1.1" ,
7071 "@ljharb/tsconfig" : " ^0.2.0" ,
7172 "@types/call-bind" : " ^1.0.5" ,
73+ "@types/es-abstract" : " ^1.17.9" ,
7274 "@types/for-each" : " ^0.3.3" ,
7375 "@types/gopd" : " ^1.0.3" ,
7476 "@types/is-callable" : " ^1.1.2" ,
107109 },
108110 "publishConfig" : {
109111 "ignore" : [
110- " .github/workflows"
112+ " .github/workflows" ,
113+ " types"
111114 ]
112115 }
113116}
Original file line number Diff line number Diff line change 22 "extends" : " @ljharb/tsconfig" ,
33 "compilerOptions" : {
44 "target" : " ES2021" ,
5+ "maxNodeModuleJsDepth" : 0 ,
56 },
67 "exclude" : [
78 " coverage" ,
Original file line number Diff line number Diff line change 1+ declare module 'reflect.getprototypeof/polyfill' {
2+ function getPolyfill ( ) : typeof Reflect . getPrototypeOf ;
3+
4+ export = getPolyfill ;
5+ }
You can’t perform that action at this time.
0 commit comments