Unable to filter list based on the node type

Hi everybody,

I'm trying to write a mapping inside a loop-macro, but I wasn't able to achieve what I wanted.
I have a list of rootElements with different nodes instances implementing interfaces (so I can tell what they are all about). At some point in my logic I want to do something like:

node.rootElements.ofType<node<ILinkNode>>

But, unfortunately, all the nodes are returned without taking into account the type, can anybody point out the way of achieving this filtering?

Regards
Peter.

Please sign in to leave a comment.