Closed juanigaray closed 3 years ago
The Tree type defines a node of a tree which must have two Tree chidren. This makes it impossible for there to be leaf nodes. This commit makes the Tree type definition realistic, making both subtrees optional.
Fixes #1339
Thanks! Added this to the new site in https://github.com/microsoft/TypeScript-Website/pull/832
The Tree type defines a node of a tree which must have two Tree chidren. This makes it impossible for there to be leaf nodes. This commit makes the Tree type definition realistic, making both subtrees optional.
Fixes #1339