Skip to content

Fix children types #2

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

Merged
merged 2 commits into from
Oct 30, 2020
Merged

Fix children types #2

merged 2 commits into from
Oct 30, 2020

Conversation

remcohaszing
Copy link
Member

This fixes the following:

  • children are accepted as spread arguments, like in the readme examples.
  • children may be nested infinitely.

This uses recursive types, which is supported as of TypeScript 3.7.

I was able to determine from the code that arrays of nested children are supported. A test was added to assert this behaviour.

@wooorm wooorm merged commit 1609850 into syntax-tree:main Oct 30, 2020
@ChristianMurphy ChristianMurphy added ☂️ area/types This affects typings 👶 semver/patch This is a backwards-compatible fix labels Oct 30, 2020
@wooorm
Copy link
Member

wooorm commented Oct 30, 2020

Thanks Remco, released in 2.0.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

3 participants