Skip to content

Commit 42bb005

Browse files
authored
🤖 Merge PR DefinitelyTyped#71636 imagemin: fix Buffer -> Uint8Array by @domdomegg
1 parent d6df3e8 commit 42bb005

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

types/imagemin/imagemin-tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ imagemin(["*.png"], { destination: "dist", plugins: [] }).then((results: Result[
66

77
imagemin
88
.buffer(
9-
Buffer.from([
9+
Uint8Array.from([
1010
/* ... */
1111
]),
1212
)
13-
.then((result: Buffer) => {
13+
.then((result: Uint8Array) => {
1414
/* ... */
1515
});
1616
imagemin
1717
.buffer(
18-
Buffer.from([
18+
Uint8Array.from([
1919
/* ... */
2020
]),
2121
{ plugins: [] },
2222
)
23-
.then((result: Buffer) => {
23+
.then((result: Uint8Array) => {
2424
/* ... */
2525
});

types/imagemin/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare namespace imagemin {
99
/**
1010
* @async
1111
*/
12-
function buffer(input: Buffer, options?: BufferOptions): Promise<Buffer>;
12+
function buffer(data: Uint8Array, options?: BufferOptions): Promise<Uint8Array>;
1313
}
1414

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

2323
export interface Result {
24-
data: Buffer;
24+
data: Uint8Array;
2525
sourcePath: string;
2626
destinationPath: string;
2727
}

0 commit comments

Comments
 (0)