@@ -26,7 +26,7 @@ function makeClasslessInspect<K extends BSONClassKey>(
2626) : CustomInspectFunction {
2727 const originalInspect = BSON [ className ] . prototype . inspect ;
2828 return function (
29- this : typeof originalInspect ,
29+ this : ( typeof BSON ) [ typeof className ] [ 'prototype' ] ,
3030 ...args : Parameters < typeof originalInspect >
3131 ) {
3232 return removeNewFromInspectResult ( originalInspect . apply ( this , args ) ) ;
@@ -49,7 +49,7 @@ const binaryVectorInspect = function (
4949 // These arrays can be very large, so would prefer to use the default options instead.
5050 maxArrayLength : utilInspect . defaultOptions . maxArrayLength ,
5151 } )
52- ) } )`;
52+ ) } )) `;
5353 case BSON . Binary . VECTOR_TYPE . Float32 :
5454 return `Binary.fromFloat32Array(new Float32Array(${ removeTypedArrayPrefixFromInspectResult (
5555 utilInspect ( this . toFloat32Array ( ) , {
@@ -58,16 +58,16 @@ const binaryVectorInspect = function (
5858 // These arrays can be very large, so would prefer to use the default options instead.
5959 maxArrayLength : utilInspect . defaultOptions . maxArrayLength ,
6060 } )
61- ) } )`;
61+ ) } )) `;
6262 case BSON . Binary . VECTOR_TYPE . PackedBit :
63- return `Binary.fromPackedBitArray (new Uint8Array(${ removeTypedArrayPrefixFromInspectResult (
63+ return `Binary.fromPackedBits (new Uint8Array(${ removeTypedArrayPrefixFromInspectResult (
6464 utilInspect ( this . toPackedBits ( ) , {
6565 depth,
6666 ...options ,
6767 // These arrays can be very large, so would prefer to use the default options instead.
6868 maxArrayLength : utilInspect . defaultOptions . maxArrayLength ,
6969 } )
70- ) } )`;
70+ ) } )) `;
7171 default :
7272 return binaryInspect . call ( this , depth , options ) ;
7373 }
0 commit comments