Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hlg-facai opened this issue Apr 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hlg-facai
Copy link

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
@tvillaren tvillaren added the bug Something isn't working label Apr 15, 2024
@tvillaren tvillaren changed the title The presence of HTMLImageElement causes the entire interface export to be empty The presence of standard built-in types (e.g. HTMLImageElement) causes the entire interface export to be empty Apr 15, 2024
@tvillaren
Copy link
Collaborator

There is a tentative implementation on #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants