From fe8b0ae5d9d9fa598e8e5d29f2dfd3cc1bd75632 Mon Sep 17 00:00:00 2001 From: GeKorm Date: Mon, 10 Nov 2025 00:20:24 +0000 Subject: [PATCH] fix(imgix): types for combined 'auto' operations --- src/providers/imgix.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/providers/imgix.ts b/src/providers/imgix.ts index 45a3d39..fef68c4 100644 --- a/src/providers/imgix.ts +++ b/src/providers/imgix.ts @@ -12,6 +12,8 @@ import { toUrl, } from "../utils.ts"; +type Auto = "true" | "format" | "compress" | "enhance" | "redeye"; + export type ImixFormats = | ImageFormat | "gif" @@ -76,10 +78,15 @@ export interface ImgixOperations extends Operations { /** * Automatic optimizations to apply. - * Can be a combination of "format", "compress", "enhance", "redeye". + * Can be a combination of "format", "compress", "enhance", "redeye", "true". * @example "format,compress" */ - auto?: "format" | "compress" | "enhance" | "redeye"; + auto?: + | Auto + | `${Auto},${Auto}` + | `${Auto},${Auto},${Auto}` + | `${Auto},${Auto},${Auto},${Auto}` + | `${Auto},${Auto},${Auto},${Auto},${Auto}`; /** * Contrast adjustment (-100 to 100).