-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
143 lines (120 loc) · 2.66 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Type definitions for @vheemstra/imagemin-oxipng 2.0.0
// Project: https://github.com/vheemstra/imagemin-oxipng#readme
// Definitions by: Philip van Heemstra <https://github.com/vheemstra>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Plugin } from 'imagemin';
/**
* Oxipng imagemin plugin
*/
export default function imageminOxipng(options?: Options): Plugin;
export interface Options {
/**
* Optimization level.
* Possible values: 0, 1, 2, 3, 4, 5, 6 or 'max'.
*
* NOTE: Manually specifying a compression option (`options.zc`, `options.filters`, etc.) will override the optimization preset, regardless of the order you write the arguments.
*
* @default 2
*/
optimization?: number | 'max'
/**
* Preserve file attributes if possible.
*/
preserve?: boolean
/**
* Do not run any optimization passes.
*/
check?: boolean
/**
* Strip metadata objects ['safe', 'all' or list].
*
* NOTE: Only either `options.strip` _**or**_ `options.keep` option can be set.
*/
strip?: 'safe' | 'all' | string[]
/**
* Strip all optional metadata _except_ objects in the list.
*
* NOTE: Only either `options.strip` _**or**_ `options.keep` option can be set.
*/
keep?: string[]
/**
* Perform additional alpha optimizations.
*/
alpha?: boolean
/**
* PNG interlace type [possible values: 0, 1].
*/
interlace?: number
/**
* Use fast filter evaluation.
*/
fast?: boolean
/**
* PNG delta filters (0,9).
*
* PNG delta filters:
* ```
* 0 => None
* 1 => Sub
* 2 => Up
* 3 => Average
* 4 => Paeth
* ```
* Heuristic filter selection strategies:
* ```
* 5 => MinSum Minimum sum of absolute differences
* 6 => Entropy Highest Shannon entropy
* 7 => Bigrams Lowest count of distinct bigrams
* 8 => BigEnt Highest Shannon entropy of bigrams
* 9 => Brute Smallest compressed size (slow)
* ```
* @default [0,5]
*/
filters?: number[]
/**
* zlib compression level (1-12).
*
* @default 11
*/
zc?: number
/**
* No bit depth reduction.
*/
nb?: boolean
/**
* No color type reduction.
*/
nc?: boolean
/**
* No palette reduction.
*/
np?: boolean
/**
* No grayscale reduction.
*/
ng?: boolean
/**
* No reductions.
*/
nx?: boolean
/**
* No IDAT recoding unless necessary.
*/
nz?: boolean
/**
* Enable error recovery.
*/
fix?: boolean
/**
* Write the output even if it is larger than the input.
*/
force?: boolean
/**
* Maximum amount of time, in seconds, to spend on optimizations.
*/
timeout?: number
/**
* Use the slower but better compressing Zopfli algorithm.
*/
zopfli?: boolean
}