Skip to content

The presence of standard built-in types (e.g. HTMLImageElement) causes the entire interface export to be empty #231

@hlg-facai

Description

@hlg-facai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions