@@ -551,7 +551,9 @@ async function inputAccounts(args: ClientOpts) {
551
551
} )
552
552
553
553
// Hide key input
554
- ; ( rl as any ) . input . on ( 'keypress' , function ( ) {
554
+ // TODO: Investigate why type doesn't match & if this actually works
555
+ // @ts -expect-error -- Absent from type
556
+ rl [ 'input' ] . on ( 'keypress' , function ( ) {
555
557
// get the number of characters entered so far:
556
558
const len = ( rl as any ) . line . length
557
559
// move cursor back to the beginning of the input:
@@ -560,7 +562,9 @@ async function inputAccounts(args: ClientOpts) {
560
562
readline . clearLine ( ( rl as any ) . output , 1 )
561
563
// replace the original input with asterisks:
562
564
for ( let i = 0 ; i < len ; i ++ ) {
563
- ; ( rl as any ) . output . write ( '*' )
565
+ // TODO: Investigate why type doesn't match & if this actually works
566
+ // @ts -expect-error -- Absent from type
567
+ rl [ 'output' ] . write ( '*' )
564
568
}
565
569
} )
566
570
@@ -579,7 +583,9 @@ async function inputAccounts(args: ClientOpts) {
579
583
const inputKey = ( await question (
580
584
`Please enter the 0x-prefixed private key to unlock ${ address } :\n` ,
581
585
) ) as PrefixedHexString
582
- ; ( rl as any ) . history = ( rl as any ) . history . slice ( 1 )
586
+ // TODO: Investigate why type doesn't match & if this actually works
587
+ // @ts -expect-error -- -- Property not present on type
588
+ rl [ 'history' ] = rl [ 'history' ] . slice ( 1 )
583
589
const privKey = hexToBytes ( inputKey )
584
590
const derivedAddress = createAddressFromPrivateKey ( privKey )
585
591
if ( address . equals ( derivedAddress ) === true ) {
@@ -720,7 +726,8 @@ export async function generateClientConfig(args: ClientOpts) {
720
726
common = createCommonFromGethGenesis ( genesisFile , {
721
727
chain : chainName ,
722
728
} )
723
- ; ( common . customCrypto as any ) = cryptoFunctions
729
+ // @ts -expect-error -- Assign to read-only property
730
+ common . customCrypto = cryptoFunctions
724
731
customGenesisState = parseGethGenesisState ( genesisFile )
725
732
}
726
733
0 commit comments