Shared: Added type module resize-image
This commit is contained in:
parent
b36a544a0e
commit
243d79039b
25
packages/shared/index.d.ts
vendored
25
packages/shared/index.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user