diff --git a/types/index.d.ts b/types/index.d.ts index 69f5525ea..c60a67589 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -445,25 +445,19 @@ declare module "jspdf" { translate(x: number, y: number): void; } - export enum ImageCompression { - NONE = "NONE", - FAST = "FAST", - MEDIUM = "MEDIUM", - SLOW = "SLOW" - } - export enum ColorSpace { - DEVICE_RGB = "DeviceRGB", - DEVICE_GRAY = "DeviceGray", - DEVICE_CMYK = "DeviceCMYK", - CAL_GRAY = "CalGray", - CAL_RGB = "CalRGB", - LAB = "Lab", - ICC_BASED = "ICCBased", - INDEXED = "Indexed", - PATTERN = "Pattern", - SEPARATION = "Separation", - DEVICE_N = "DeviceN" - } + export type ImageCompression = "NONE" | "FAST" | "MEDIUM" | "SLOW"; + export type ColorSpace = + | "DeviceRGB" + | "DeviceGray" + | "DeviceCMYK" + | "CalGray" + | "CalRGB" + | "Lab" + | "ICCBased" + | "Indexed" + | "Pattern" + | "Separation" + | "DeviceN"; export interface ImageOptions { imageData: string | HTMLImageElement | HTMLCanvasElement | Uint8Array; diff --git a/types/jspdf-tests-node.ts b/types/jspdf-tests-node.ts index bc15b7a87..7764d6625 100644 --- a/types/jspdf-tests-node.ts +++ b/types/jspdf-tests-node.ts @@ -586,7 +586,8 @@ function test_addImage() { x: 0, y: 0, width: 100, - height: 100 + height: 100, + compression: "FAST" }); } diff --git a/types/jspdf-tests.ts b/types/jspdf-tests.ts index 64cba864a..bf5d480e3 100644 --- a/types/jspdf-tests.ts +++ b/types/jspdf-tests.ts @@ -585,7 +585,8 @@ function test_addImage() { x: 0, y: 0, width: 100, - height: 100 + height: 100, + compression: "FAST" }); }