/// <reference types="node" />
import sharp, { Sharp, Matrix3x3 } from 'sharp';
import { Duplex } from 'stream';
import { IFastlyParams, Mapper, Warning } from '../imageopto-types';
declare type SharpCall = [keyof Sharp, any[]];
declare type CallbackOf<T> = (err: Error, res: T) => void;
declare class MockSharp extends Duplex implements Sharp {
    calls: SharpCall[];
    removeAlpha(): sharp.Sharp;
    ensureAlpha(): sharp.Sharp;
    extractChannel(..._: any[]): sharp.Sharp;
    joinChannel(..._: any[]): sharp.Sharp;
    bandbool(..._: any[]): sharp.Sharp;
    tint(..._: any[]): sharp.Sharp;
    greyscale(..._: any[]): sharp.Sharp;
    grayscale(..._: any[]): sharp.Sharp;
    toColourspace(..._: any[]): sharp.Sharp;
    toColorspace(..._: any[]): sharp.Sharp;
    composite(..._: any[]): sharp.Sharp;
    clone(): sharp.Sharp;
    metadata(callback: (err: Error, metadata: sharp.Metadata) => void): sharp.Sharp;
    metadata(): Promise<sharp.Metadata>;
    stats(callback: (err: Error, stats: sharp.Stats) => void): sharp.Sharp;
    stats(): Promise<sharp.Stats>;
    limitInputPixels(..._: any[]): sharp.Sharp;
    sequentialRead(..._: any[]): sharp.Sharp;
    rotate(_angle?: number | undefined, _options?: sharp.RotateOptions | undefined): sharp.Sharp;
    flip(_flip?: boolean | undefined): sharp.Sharp;
    flop(_flop?: boolean | undefined): sharp.Sharp;
    sharpen(_sigma?: number | undefined, _flat?: number | undefined, _jagged?: number | undefined): sharp.Sharp;
    median(_size?: number | undefined): sharp.Sharp;
    blur(_sigma?: number | undefined): sharp.Sharp;
    flatten(_flatten?: boolean | sharp.FlattenOptions | undefined): sharp.Sharp;
    gamma(_gamma?: number | undefined): sharp.Sharp;
    negate(_negate?: boolean | undefined): sharp.Sharp;
    normalise(_normalise?: boolean | undefined): sharp.Sharp;
    normalize(_normalize?: boolean | undefined): sharp.Sharp;
    convolve(_kernel: sharp.Kernel): sharp.Sharp;
    threshold(_threshold?: number | undefined, _options?: sharp.ThresholdOptions | undefined): sharp.Sharp;
    boolean(_operand: string | Buffer, _operator: string, _options?: {
        raw: sharp.Raw;
    } | undefined): sharp.Sharp;
    linear(_a?: number | null | undefined, _b?: number | undefined): sharp.Sharp;
    recomb(_matrix: Matrix3x3): MockSharp;
    modulate(..._: any[]): sharp.Sharp;
    toFile(fileOut: string, callback: CallbackOf<sharp.OutputInfo>): sharp.Sharp;
    toFile(fileOut: string): Promise<sharp.OutputInfo>;
    toBuffer(callback: (err: Error, buffer: Buffer, info: sharp.OutputInfo) => void): sharp.Sharp;
    toBuffer(options?: {
        resolveWithObject: false;
    } | undefined): Promise<Buffer>;
    toBuffer(options: {
        resolveWithObject: true;
    }): Promise<{
        data: Buffer;
        info: sharp.OutputInfo;
    }>;
    withMetadata(..._: any[]): sharp.Sharp;
    jpeg(..._: any[]): sharp.Sharp;
    png(..._: any[]): sharp.Sharp;
    webp(..._: any[]): sharp.Sharp;
    tiff(..._: any[]): sharp.Sharp;
    raw(): sharp.Sharp;
    toFormat(_format: string | sharp.AvailableFormatInfo, _options?: sharp.JpegOptions | sharp.OutputOptions | sharp.PngOptions | sharp.WebpOptions | sharp.TiffOptions | undefined): sharp.Sharp;
    tile(_tile?: sharp.TileOptions | undefined): sharp.Sharp;
    resize(_width?: sharp.ResizeOptions | number | null | undefined, _height?: number | null | undefined, _options?: sharp.ResizeOptions | undefined): sharp.Sharp;
    extend(_extend: number | sharp.ExtendOptions): sharp.Sharp;
    extract(_region: sharp.Region): sharp.Sharp;
    trim(_threshold?: number | undefined): sharp.Sharp;
    private track;
}
export declare function mockParams(query: string): IFastlyParams;
export declare function runMapperWithParams(mapper: Mapper, query: string): {
    mock: MockSharp;
    warnings: Warning[];
    mapped: MockSharp | false;
};
export {};
