@@ -81,7 +81,7 @@ const RETRIABLE_STATUS_CODES = [500, 503, 504, 507, 509, 523, 524, 529, 599];
8181 * </p>
8282 * <p>
8383 * It is recommended that the Sender is created by using one of the static factory methods,
84- * <i>Sender.fromConfig(configString, extraOptions)</i> or <i>Sender.fromEnv(extraOptions)</i>) .
84+ * <i>Sender.fromConfig(configString, extraOptions)</i> or <i>Sender.fromEnv(extraOptions)</i>.
8585 * If the Sender is created via its constructor, at least the SenderOptions configuration object should be
8686 * initialized from a configuration string to make sure that the parameters are validated. <br>
8787 * Detailed description of the Sender's configuration options can be found in
@@ -407,7 +407,7 @@ class Sender {
407407 "info" ,
408408 `Authenticating with ${ ( connectOptions as tls . ConnectionOptions ) . host } :${ ( connectOptions as tls . ConnectionOptions ) . port } ` ,
409409 ) ;
410- await this . socket . write ( `${ this . jwk . kid } \n` , ( err ) => {
410+ await this . socket . write ( `${ this . jwk . kid } \n` , ( err : Error ) => {
411411 if ( err ) {
412412 reject ( err ) ;
413413 }
@@ -570,7 +570,7 @@ class Sender {
570570 throw new Error ( "Sender is not connected" ) ;
571571 }
572572 return new Promise ( ( resolve , reject ) => {
573- this . socket . write ( dataToSend , ( err ) => { // Use the copied dataToSend
573+ this . socket . write ( dataToSend , ( err : Error ) => { // Use the copied dataToSend
574574 if ( err ) {
575575 reject ( err ) ;
576576 } else {
@@ -614,7 +614,7 @@ class Sender {
614614 * If the last row is not finished it stays in the sender's buffer.
615615 * This operation is added to a queue and executed sequentially.
616616 *
617- * @return {Promise<boolean> } Resolves to true when there was data in the buffer to send and it was sent successfully.
617+ * @return {Promise<boolean> } Resolves to true when there was data in the buffer to send, and it was sent successfully.
618618 */
619619 async flush ( ) : Promise < boolean > {
620620 // Add to the promise chain to ensure sequential execution
@@ -626,7 +626,7 @@ class Sender {
626626 }
627627 return this . _executeFlush ( ) ;
628628 } )
629- . catch ( ( err ) => {
629+ . catch ( ( err : Error ) => {
630630 // Log or handle error. If _executeFlush throws, it will be caught here.
631631 // The error should have already been logged by _executeFlush.
632632 // We re-throw to ensure the promise chain reflects the failure.
@@ -893,7 +893,7 @@ async function authenticate(
893893 return new Promise ( ( resolve , reject ) => {
894894 sender . socket . write (
895895 `${ Buffer . from ( signature ) . toString ( "base64" ) } \n` ,
896- ( err ) => {
896+ ( err : Error ) => {
897897 if ( err ) {
898898 reject ( err ) ;
899899 } else {
0 commit comments