@@ -18,7 +18,7 @@ const rawValue = process.env["JSON_DEBUG"]?.trim();
1818const DEBUG = rawValue === "true" ? 1 : rawValue === "false" || rawValue === "" ? 0 : isNaN ( Number ( rawValue ) ) ? 0 : Number ( rawValue ) ;
1919
2020const STRICT = process . env [ "JSON_STRICT" ] && process . env [ "JSON_STRICT" ] == "true" ;
21- const STRING_SCAN_SUFFIX_BOUND_LIMIT = process . env [ "STRING_SCAN_SUFFIX_BOUND_LIMIT" ] ? parseInt ( process . env [ "STRING_SCAN_SUFFIX_BOUND_LIMIT" ] ) : 1024 ;
21+ // const STRING_SCAN_SUFFIX_BOUND_LIMIT = process.env["STRING_SCAN_SUFFIX_BOUND_LIMIT"] ? parseInt(process.env["STRING_SCAN_SUFFIX_BOUND_LIMIT"]) : 1024;
2222
2323export class JSONTransform extends Visitor {
2424 static SN : JSONTransform = new JSONTransform ( ) ;
@@ -508,7 +508,7 @@ export class JSONTransform extends Visitor {
508508 const getComparisions = ( data : string , ptr : string , operator : string ) : string [ ] => {
509509 const dataBytes = data . length << 1 ;
510510 let offset = 0 ;
511- let output : string [ ] = [ ] ;
511+ const output : string [ ] = [ ] ;
512512 while ( offset < dataBytes ) {
513513 const rem = dataBytes - offset ;
514514 if ( rem >= 8 ) {
@@ -542,7 +542,7 @@ export class JSONTransform extends Visitor {
542542 return null ;
543543 } ;
544544
545- const getDeserializer = ( type : string , srcPtr : string , outPtr : string , member : Property , index : number ) : string [ ] => {
545+ const getDeserializer = ( type : string , srcPtr : string , outPtr : string , member : Property ) : string [ ] => {
546546 const out : string [ ] = [ ] ;
547547 const resolvedType = stripNull ( type ) ;
548548 const fieldPtr = `${ outPtr } + offsetof<this>(${ JSON . stringify ( member . name ) } )` ;
@@ -1544,11 +1544,11 @@ function toU32(data: string, offset: number = 0): number {
15441544 return ( data . charCodeAt ( offset + 1 ) << 16 ) | data . charCodeAt ( offset + 0 ) ;
15451545}
15461546
1547- function toU48 ( data : string , offset : number = 0 ) : BigInt {
1547+ function toU48 ( data : string , offset : number = 0 ) : bigint {
15481548 return ( BigInt ( data . charCodeAt ( offset + 2 ) ) << 32n ) | ( BigInt ( data . charCodeAt ( offset + 1 ) ) << 16n ) | BigInt ( data . charCodeAt ( offset + 0 ) ) ;
15491549}
15501550
1551- function toU64 ( data : string , offset : number = 0 ) : BigInt {
1551+ function toU64 ( data : string , offset : number = 0 ) : bigint {
15521552 return ( BigInt ( data . charCodeAt ( offset + 3 ) ) << 48n ) | ( BigInt ( data . charCodeAt ( offset + 2 ) ) << 32n ) | ( BigInt ( data . charCodeAt ( offset + 1 ) ) << 16n ) | BigInt ( data . charCodeAt ( offset + 0 ) ) ;
15531553}
15541554
0 commit comments