What is the best way distinguish GoJS classes

Hi!

Let’s assume I’m overriding commandHandler methods like doKeyDow,
I’m getting my target from diagram.selection and it is Set .
How can I figure out what is what? How to separate things correctly?
We have Node Link Adornment classes which extended from Part.
How can I tell that this is link and that is node.
I can use diagram.selection.first (). Type.name but i dont really like it since it will bring me PanelLayout and i dont want to rely on that.

Any suggestions?

Thanks
Vlad

Use instanceof. Or are you actually asking a different question?

I’m embarrassed.
I guess I got a brain lock on gojs and completly forgot that there is a basic js.
Brain freeze was so massive I managed to write a post here …
Thanks Walter. Sorry for bothering you with it …