Sets the type of the given object. This will do two things: 1. update the appropriate property in the object's data to this new value. You can set what properties define types, but by default each of Node, Edge and Port use
type as the property that indicates their type. 2. attempt to apply a type definition for the new type, if one is found. NB this only applies to Edge objects, as at version 1.1.0. Support for Nodes (including switching node templates) is a possible future enhancement.
setType(obj: Base, type: any): void;
|obj||Base||Object to set the type for.|
|type||any||Type to set on the object.|