fix: the invalid image types.

This commit is contained in:
Yufan Sheng 2024-06-21 01:19:33 +08:00
parent 42776cf8b0
commit 2ddb050dd2
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ const Options = z
}), }),
thumbnail: z thumbnail: z
.function() .function()
.args(z.object({ src: z.string().min(1), width: z.number(), height: z.number() })) .args(z.object({ src: z.string().min(1), width: z.number().or(z.string()), height: z.number().or(z.string()) }))
.returns(z.string()), .returns(z.string()),
}) })
.transform((opts) => { .transform((opts) => {

View File

@ -11,11 +11,11 @@ export interface Image {
/** /**
* image width * image width
*/ */
width: number; width: number | string;
/** /**
* image height * image height
*/ */
height: number; height: number | string;
/** /**
* blurDataURL of the image * blurDataURL of the image
*/ */