mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 21:37:11 -04:00
parent
9eac9cb2a9
commit
d3ee99a2b0
8 changed files with 261 additions and 26 deletions
30
src/tools/heic-converter/heic-convert.d.ts
vendored
Normal file
30
src/tools/heic-converter/heic-convert.d.ts
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
declare module 'heic-convert/browser' {
|
||||
interface ConversionOptions {
|
||||
/**
|
||||
* the HEIC file buffer
|
||||
*/
|
||||
buffer: ArrayBufferLike;
|
||||
/**
|
||||
* output format
|
||||
*/
|
||||
format: "JPEG" | "PNG";
|
||||
/**
|
||||
* the JPEG compression quality, between 0 and 1
|
||||
* @default 0.92
|
||||
*/
|
||||
quality?: number;
|
||||
}
|
||||
|
||||
interface Convertible {
|
||||
convert(): Promise<ArrayBuffer>;
|
||||
}
|
||||
|
||||
/** @async */
|
||||
declare function convert(image: ConversionOptions): Promise<ArrayBuffer>;
|
||||
declare namespace convert {
|
||||
/** @async */
|
||||
function all(image: ConversionOptions): Promise<Convertible[]>;
|
||||
}
|
||||
|
||||
export default convert;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue