fix: the invalid image types.

This commit is contained in:
Yufan Sheng 2024-06-21 01:19:33 +08:00
parent 988a24e5b8
commit 6edaea9245
Signed by: syhily
GPG Key ID: DEB186763C308C31
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ const Options = z
}),
thumbnail: z
.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()),
})
.transform((opts) => {

View File

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