There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?

2

Closed

Can I define an Interface that can hold an object or an array?

description

I am trying to define an interface that can hold an object or an array. For example, a tree where internal nodes are arrays and leaf nodes are objects could have a traversal function that takes a single argument which is an array or an object. To walk
the tree the traversal function might test the argument and if an object (no length property) then process the leaf else call traverse on each element of the array.

file attachments

As part of our move to GitHub, we're closing our CodePlex suggestions and asking that people move them to the GitHub issue tracker for further discussion. Some feature requests may already be active on GitHub, so please make sure to look for an existing
issue before filing a new one.