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

feat: support z.input #3

Merged
merged 2 commits into from
Jan 6, 2024
Merged

Conversation

boneskull
Copy link
Contributor

This adds support for types created via z.input.

These types are useful if defaults or other ZodEffects are used.

See https://zod.dev/?id=guides-and-concepts

This adds support for types created via `z.input`.

These types are useful if defaults or other `ZodEffects` are used.

See https://zod.dev/?id=guides-and-concepts
TSConfigReader,
TypeScript as ts,
ReflectionType,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProjectReflection removed above was unused

Comment on lines +64 to +68
expect(
(typeDeclaration.type as ReflectionType)!.declaration!.getChildByName(
"def",
)!.flags.isOptional,
).toBe(false);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure you have a better way to do this. 😄

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some utilities to in typedoc, but they aren't exported, this works

@Gerrit0 Gerrit0 merged commit 30e0a70 into Gerrit0:main Jan 6, 2024
3 checks passed
@Gerrit0
Copy link
Owner

Gerrit0 commented Jan 6, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants