You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using the following to type @hapi/b64. It would be nice if this module exported its own types. I d'ont have the time or resources to make a PR. Sorry about that.
declare module '@hapi/b64'{import{Transform}from'node:stream'exportclassDecoderextendsTransform{constructor()}exportclassEncoderextendsTransform{constructor()}/** * @param buffer - A buffer containing the base64 encoded string * @returns A buffer containing the decoded bytes */exportfunctiondecode(buffer: Buffer): Buffer/** * @params buffer - Buffer of bytes to encode * @returns A buffer containing a base64 encoded string */exportfunctionencode(buffer: Buffer): Buffer/** * Base64url (RFC 4648) encode */exportfunctionbase64urlEncode(value: string|Buffer,encoding?: BufferEncoding): string/** * Base64url (RFC 4648) decode * @param encoding - defaults to 'binary' */exportfunctionbase64urlDecode(value: string,encoding: 'buffer'): Bufferexportfunctionbase64urlDecode(value: string,encoding?: BufferEncoding): string}
The text was updated successfully, but these errors were encountered:
I am currently using the following to type
@hapi/b64
. It would be nice if this module exported its own types. I d'ont have the time or resources to make a PR. Sorry about that.The text was updated successfully, but these errors were encountered: