diff --git a/packages/helpers/src/lib/mailauth/tools.ts b/packages/helpers/src/lib/mailauth/tools.ts index 3b0b2298..53a9395d 100644 --- a/packages/helpers/src/lib/mailauth/tools.ts +++ b/packages/helpers/src/lib/mailauth/tools.ts @@ -24,16 +24,13 @@ const keyOrderingDKIM = ['v', 'a', 'c', 'd', 'h', 'i', 'l', 'q', 's', 't', 'x', export const writeToStream = async ( stream: DkimVerifier, - input: Buffer & { pipe: (...args: any) => void; on: (...args: any) => void }, + input: Buffer & NodeJS.ReadableStream, chunkSize: number = 0, ) => { chunkSize = chunkSize || 64 * 1024; if (typeof input === 'string') { - input = Buffer.from(input) as Buffer & { - pipe: (...args: any) => void; - on: (...args: any) => void; - }; + input = Buffer.from(input) as Buffer & NodeJS.ReadableStream; } return new Promise((resolve, reject) => { diff --git a/packages/helpers/src/sha-utils.ts b/packages/helpers/src/sha-utils.ts index c74bb65f..16501c84 100644 --- a/packages/helpers/src/sha-utils.ts +++ b/packages/helpers/src/sha-utils.ts @@ -19,7 +19,7 @@ export function findIndexInUint8Array(array: Uint8Array, selector: Uint8Array): return -1; } -export function padUint8ArrayWithZeros(array: Uint8Array, length: number) { +export function padUint8ArrayWithZeros(array: Uint8Array, length: number): Uint8Array { while (array.length < length) { // eslint-disable-next-line no-param-reassign array = mergeUInt8Arrays(array, int8toBytes(0));