Skip to content

Commit 9bbfce8

Browse files
fix
1 parent 7fae0e2 commit 9bbfce8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/astro/src/assets/endpoint/generic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const GET: APIRoute = async ({ request }) => {
6363
imageConfig,
6464
);
6565

66-
return new Response(data, {
66+
return new Response(data as Uint8Array<ArrayBuffer>, {
6767
status: 200,
6868
headers: {
6969
'Content-Type': mime.lookup(format) ?? `image/${format}`,

packages/astro/src/assets/endpoint/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const GET: APIRoute = async ({ request }) => {
112112

113113
const { data, format } = await imageService.transform(inputBuffer, transform, imageConfig);
114114

115-
return new Response(data, {
115+
return new Response(data as Uint8Array<ArrayBuffer>, {
116116
status: 200,
117117
headers: {
118118
'Content-Type': mime.lookup(format) ?? `image/${format}`,

packages/astro/src/assets/services/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export interface LocalImageService<T extends Record<string, any> = Record<string
105105
inputBuffer: Uint8Array,
106106
transform: LocalImageTransform,
107107
imageConfig: ImageConfig<T>,
108-
) => Promise<{ data: Uint8Array<ArrayBuffer>; format: ImageOutputFormat }>;
108+
) => Promise<{ data: Uint8Array; format: ImageOutputFormat }>;
109109

110110
/**
111111
* A list of properties that should be used to generate the hash for the image.

0 commit comments

Comments
 (0)