Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace exported enum types by string unions #3021

Merged
merged 3 commits into from Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 13 additions & 19 deletions types/index.d.ts
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion types/jspdf-tests-node.ts
Expand Up @@ -586,7 +586,8 @@ function test_addImage() {
x: 0,
y: 0,
width: 100,
height: 100
height: 100,
compression: "FAST"
});
}

Expand Down
3 changes: 2 additions & 1 deletion types/jspdf-tests.ts
Expand Up @@ -585,7 +585,8 @@ function test_addImage() {
x: 0,
y: 0,
width: 100,
height: 100
height: 100,
compression: "FAST"
});
}

Expand Down