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

fix(types): inference for default any schema #577

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

avallete
Copy link
Member

What kind of change does this PR introduce?

  • Detected a bug for the "any" schema case while upgrading the workers dependency this make the inference logic more recursive reducing the chances of error and restore the type to match what was generated on 2.46.1

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@avallete avallete requested a review from soedirgo November 13, 2024 09:53
: any
}[]
: any[]
[K in GetFieldNodeResultName<Node>]: Node['children'] extends Ast.Node[]
Copy link
Member Author

Choose a reason for hiding this comment

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

remark

Use GetFieldNodeResultName to have the embedding properly renamed.

Comment on lines +82 to +83
? ProcessNodesWithoutSchema<Node['children']>[]
: ProcessSimpleFieldWithoutSchema<Node>
Copy link
Member Author

Choose a reason for hiding this comment

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

remark

Re-use the other functions to infer the final result recursively rather than duplicating the logic.

@avallete avallete merged commit efa3e5c into master Nov 13, 2024
1 check passed
Copy link

🎉 This PR is included in version 1.17.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants