import type { CompressFormat as ICompressFormat } from './squared'; import type { LogBaseOptions, LogTime } from './logger'; interface CompressFormat extends ICompressFormat, LogBaseOptions { filename?: string; startTime?: LogTime; etag?: string; proxyUrl?: string | ((uri: string) => Undef); } interface Woff { toWoff(this: void, data: BufferLike): Buffer; toSfnt(this: void, data: BufferLike): Buffer; } type ResultCallback> = (err: unknown, data?: T, ext?: string) => void; type ResultData = Null | string; export type BufferLike = Buffer | Uint8Array | ArrayBuffer | SharedArrayBuffer | readonly number[]; export type TryFileCompressor = (data: string | Buffer, output: string, config: CompressFormat, callback?: TryFileResult) => Void>; export type TryFileCompressorAsync = (data: string | Buffer, output: string, config: CompressFormat) => Promise; export type TryFileResult = ResultCallback; export type TryImageResult = ResultCallback; export type BufferResult = Null;