/// export type OutputFormat = 'uint8' | 'buffer' | 'hex' // >= TypeScript 5.9 made Uint8Array's templated with <> and defaulted to ArrayBufferLike // which would incorrectly accept SharedArrayBuffer instances. // < TypeScript 5.7 doesn't support templates for Uint8Array. // So this type is defined as a workaround to evaluate to Uint8Array on all versions of TypeScript. export type StrictUint8Array = ReturnType export type SingleInput = string | StrictUint8Array export type ChunkedInput = StrictUint8Array | readonly [StrictUint8Array, ...StrictUint8Array[]] export type AnyInput = string | ChunkedInput export type Output = F extends 'buffer' ? Buffer : F extends 'hex' ? string : StrictUint8Array // for 'uint8'