mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Originally I defined `Stack` as an interface to ensure both Node and Empty variants would have an identical API. But exporting an interface allows a developer to define other implementations, when we really want to ensure that a Stack is precisely a Node or Empty instance. This PR changes to exporting a union of `Stack = Node | Empty`, and makes the interface private to the module.