ts-to-zod
ts-to-zod copied to clipboard
The presence of standard built-in types (e.g. HTMLImageElement) causes the entire interface export to be empty
Bug description
The presence of HTMLImageElement causes the entire interface export to be empty
Input
export interface GoodsAssemblyImage {
img?: HTMLImageElement;
}
Expected output
// Generated by ts-to-zod
import { z } from 'zod';
export const goodsAssemblyImageSchema = z.object({
image: z.any(),
});
Actual output
// Generated by ts-to-zod
import { z } from 'zod';
Versions
- Typescript:
v5.2.22
- Zod:
v3.8.3
There is a tentative implementation on #122