1 | export type Task<T> = () => Promise<T>;
|
2 | export type WorkerResult = import("./index").WorkerResult;
|
3 | export type SquooshOptions = import("./index").SquooshOptions;
|
4 | export type ImageminOptions = import("imagemin").Options;
|
5 | export type WebpackError = import("webpack").WebpackError;
|
6 | export type Uint8ArrayUtf8ByteString = (
|
7 | array: number[] | Uint8Array,
|
8 | start: number,
|
9 | end: number
|
10 | ) => string;
|
11 | export type StringToBytes = (string: string) => number[];
|
12 | export type MetaData = {
|
13 | warnings: Array<Error>;
|
14 | errors: Array<Error>;
|
15 | };
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export function throttleAll<T>(limit: number, tasks: Task<T>[]): Promise<T[]>;
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | export function isAbsoluteURL(url: string): boolean;
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | export function imageminNormalizeConfig<T>(
|
39 | imageminConfig: ImageminOptions
|
40 | ): Promise<ImageminOptions>;
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | export function imageminMinify<T>(
|
48 | original: WorkerResult,
|
49 | options: T
|
50 | ): Promise<WorkerResult>;
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | export function imageminGenerate<T>(
|
58 | original: WorkerResult,
|
59 | minimizerOptions: T
|
60 | ): Promise<WorkerResult>;
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | export function squooshMinify<T>(
|
68 | original: WorkerResult,
|
69 | options: T
|
70 | ): Promise<WorkerResult>;
|
71 | export namespace squooshMinify {
|
72 | export { squooshImagePoolSetup as setup };
|
73 | export { squooshImagePoolTeardown as teardown };
|
74 | }
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | export function squooshGenerate<T>(
|
82 | original: WorkerResult,
|
83 | minifyOptions: T
|
84 | ): Promise<WorkerResult>;
|
85 | export namespace squooshGenerate {
|
86 | export { squooshImagePoolSetup as setup };
|
87 | export { squooshImagePoolTeardown as teardown };
|
88 | }
|
89 | declare function squooshImagePoolSetup(): void;
|
90 | declare function squooshImagePoolTeardown(): Promise<void>;
|
91 | export {};
|