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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more type saftey for vega-lite fixme #1947

Merged
merged 1 commit into from May 6, 2024

Conversation

timothympace
Copy link
Contributor

@timothympace timothympace commented May 3, 2024

Description

A FIXME was introduced here that prevents zod's z.infer type helper from being processed properly. I don't have any knowledge of TypeScripts AST, but the if statement that is throwing the error (see #758) assumes that if type.typeArguments is present, it can safely map over type.typeArguments[0].types. Instead of assuming this true, I added additional type checking so z.infer doesn't fall into this if statement and attempt to map unless it is an array.

Fixes

#758

Version

Published prerelease version: v2.1.2-next.0

Changelog

馃帀 This release contains work from a new contributor! 馃帀

Thank you, Tim (@timothympace), for all your work!

馃悰 Bug Fix

馃敥 Dependency Updates

Authors: 2

Copy link

馃殌 PR was released in v2.2.0 馃殌

@github-actions github-actions bot added released This issue/pull request has been released. and removed prerelease labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants