Last active
November 30, 2022 03:23
-
-
Save leesei/b514f25bcd980eadee24a47ce43ddc22 to your computer and use it in GitHub Desktop.
`d.ts` for reimg, MIT license
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type definitions for reimg 1.0 | |
// Project: https://github.com/gillyb/reimg | |
// Definitions by: leesei <https://github.com/leesei> | |
declare module "reimg" { | |
type OutputProcessor = { | |
toBase64: () => string; | |
toImg: () => HTMLImageElement; | |
toCanvas: (callback: (canvas: HTMLCanvasElement) => void) => string; | |
toPng: () => HTMLImageElement; | |
toJpeg: (quality?: number = 1.0) => HTMLImageElement; | |
downloadPng: (filename?: string = "image.png") => void; | |
}; | |
type ReImg = { | |
fromSvg: (svgElement: HTMLCanvasElement) => OutputProcessor; | |
fromCanvas: (canvasElement: HTMLCanvasElement) => OutputProcessor; | |
}; | |
export const { ReImg }: { ReImg: ReImg }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment