Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71636 imagemin: fix Buffer -> Uint8Array by
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg authored Jan 17, 2025
1 parent d6df3e8 commit 42bb005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions types/imagemin/imagemin-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ imagemin(["*.png"], { destination: "dist", plugins: [] }).then((results: Result[

imagemin
.buffer(
Buffer.from([
Uint8Array.from([
/* ... */
]),
)
.then((result: Buffer) => {
.then((result: Uint8Array) => {
/* ... */
});
imagemin
.buffer(
Buffer.from([
Uint8Array.from([
/* ... */
]),
{ plugins: [] },
)
.then((result: Buffer) => {
.then((result: Uint8Array) => {
/* ... */
});
4 changes: 2 additions & 2 deletions types/imagemin/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare namespace imagemin {
/**
* @async
*/
function buffer(input: Buffer, options?: BufferOptions): Promise<Buffer>;
function buffer(data: Uint8Array, options?: BufferOptions): Promise<Uint8Array>;
}

export type Plugin = (input: Uint8Array) => Promise<Uint8Array>;
Expand All @@ -21,7 +21,7 @@ export interface Options {
}

export interface Result {
data: Buffer;
data: Uint8Array;
sourcePath: string;
destinationPath: string;
}
Expand Down

0 comments on commit 42bb005

Please sign in to comment.