Shared: Added type module resize-image

This commit is contained in:
Akmal Isomadinov 2023-12-19 22:26:55 +05:00
parent b36a544a0e
commit 243d79039b

View File

@ -16,3 +16,28 @@ declare module "*.svg" {
declare module "external-remotes-plugin" {}
declare module "csvjson-json_beautifier" {}
declare module "resize-image" {
type ImageFormat = "png" | "gif" | "bmp" | "jpeg" | "webp";
type ImageTypes = {
[P in Uppercase<ImageFormat>]: Lowercase<P>;
};
interface ResizeImage extends ImageTypes {
resize2Canvas: (
img: HTMLImageElement,
width: number,
heigh: number,
) => HTMLCanvasElement;
resize: (
img: HTMLImageElement,
width: number,
height: number,
type: ImageFormat,
) => string;
}
const value: ResizeImage;
return value;
}