Do not transcode images if they meet the size thresholds

This commit is contained in:
Josh Perez 2021-08-23 17:24:52 -04:00 committed by GitHub
parent 9066067aa4
commit 81c57107ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 89 additions and 10 deletions

View file

@ -0,0 +1,27 @@
diff --git a/node_modules/@types/sharp/index.d.ts b/node_modules/@types/sharp/index.d.ts
index 3210332..4808af0 100755
--- a/node_modules/@types/sharp/index.d.ts
+++ b/node_modules/@types/sharp/index.d.ts
@@ -23,7 +23,21 @@ import { Duplex } from "stream";
* @returns A sharp instance that can be used to chain operations
*/
declare function sharp(options?: sharp.SharpOptions): sharp.Sharp;
-declare function sharp(input?: string | Buffer, options?: sharp.SharpOptions): sharp.Sharp;
+declare function sharp(
+ input?:
+ | Buffer
+ | Uint8Array
+ | Uint8ClampedArray
+ | Int8Array
+ | Uint16Array
+ | Int16Array
+ | Uint32Array
+ | Int32Array
+ | Float32Array
+ | Float64Array
+ | string,
+ options?: sharp.SharpOptions
+): sharp.Sharp;
declare namespace sharp {
/** Object containing nested boolean values representing the available input and output formats/methods. */