Skip to content

Commit 405bbc4

Browse files
authored
fix(imgix): types for combined 'auto' operations (#178)
1 parent 482ca8f commit 405bbc4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/providers/imgix.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
toUrl,
1313
} from "../utils.ts";
1414

15+
type Auto = "true" | "format" | "compress" | "enhance" | "redeye";
16+
1517
export type ImixFormats =
1618
| ImageFormat
1719
| "gif"
@@ -76,10 +78,15 @@ export interface ImgixOperations extends Operations<ImixFormats> {
7678

7779
/**
7880
* Automatic optimizations to apply.
79-
* Can be a combination of "format", "compress", "enhance", "redeye".
81+
* Can be a combination of "format", "compress", "enhance", "redeye", "true".
8082
* @example "format,compress"
8183
*/
82-
auto?: "format" | "compress" | "enhance" | "redeye";
84+
auto?:
85+
| Auto
86+
| `${Auto},${Auto}`
87+
| `${Auto},${Auto},${Auto}`
88+
| `${Auto},${Auto},${Auto},${Auto}`
89+
| `${Auto},${Auto},${Auto},${Auto},${Auto}`;
8390

8491
/**
8592
* Contrast adjustment (-100 to 100).

0 commit comments

Comments
 (0)