Is it possible to create a node that use a custom class with the go.Node constructor?

I need to create a node that is currently using the go.graphObject.make method which has as a first parameter a custom class. is it possible to rewrite this using the node constructor?


something like new go.Node(customClass, …)

If I understand correctly, I think you probably want to extend the Node class. An example of how to do that can be see in the Tree Mapper sample. Take a look at the TreeNode definition and its usage.

That example doesn’t define the constructor to accept arguments in the same manner that the Node constructor does: Node | GoJS API

If you want to use your subclass in the same way that someone might use the Node class, you’ll need to make sure the constructor can handle either constructor signature.