Type system
How DRAGOPS pin types work, including compatibility and automatic coercion.
Overview
Every data pin in DRAGOPS carries a specific type. The type system prevents you from creating invalid wire connections in the editor and ensures data flows correctly at runtime.
When you drag a wire from an output pin, the editor highlights only the compatible input pins. This gives you immediate feedback about what connections are valid.
Pin types
DRAGOPS has 12 pin types. Each type has a distinct color in the editor so you can identify data flow at a glance. See nodes and pins for the full color reference.
| Type | Description |
|---|---|
| Exec | Controls execution order — not data. White/gray triangular pins. |
| String | Text values |
| Integer | Whole numbers |
| Float | Decimal numbers |
| Boolean | true or false |
| Object | Key-value maps |
| Array | Ordered collections |
| DateTime | Timestamps (ISO 8601) |
| Binary | Raw byte data |
| Any | Accepts any data type |
| Null | Absence of a value |
| Enum | Named enumeration values |
Compatibility rules
The type system enforces these rules when you connect pins:
Exact match
Two pins of the same type always connect. String to string, integer to integer, and so on.
Exec pins are isolated
Exec pins only connect to other exec pins. You cannot wire an exec pin to a data pin or vice versa.
Any and null are universal
- Any connects to every non-exec type. Use it when a node accepts or produces values of unknown type.
- Null connects to every non-exec type. It represents the absence of a value.
Scalar coercion group
The four scalar types — integer, float, string, and boolean — can all interconnect. The execution engine converts between them automatically at runtime.
For example, you can wire an integer output to a string input, and the value 42 becomes "42". Or wire a boolean to an integer, and true becomes 1.
String-datetime bridge
String and datetime can connect to each other. DateTime values serialize to ISO 8601 strings, and properly formatted strings parse into datetime values.
String-binary bridge
String and binary can connect to each other. This supports encoding and decoding workflows where you convert between text and raw byte data.
Strict types
Object and array do not coerce to other types. You must use explicit conversion nodes (like Stringify JSON or Parse JSON) to transform between objects/arrays and strings.
Enum identity
Enum pins connect only to other enum pins of the same enumeration type. Two pins both typed as "enum" must share the same enumeration name to be compatible.
Compatibility table
| Source ↓ / Target → | String | Int | Float | Bool | Object | Array | DateTime | Binary | Any | Null | Enum |
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | Yes | Yes | Yes | Yes | No | No | Yes | Yes | Yes | Yes | No |
| Integer | Yes | Yes | Yes | Yes | No | No | No | No | Yes | Yes | No |
| Float | Yes | Yes | Yes | Yes | No | No | No | No | Yes | Yes | No |
| Boolean | Yes | Yes | Yes | Yes | No | No | No | No | Yes | Yes | No |
| Object | No | No | No | No | Yes | No | No | No | Yes | Yes | No |
| Array | No | No | No | No | No | Yes | No | No | Yes | Yes | No |
| DateTime | Yes | No | No | No | No | No | Yes | No | Yes | Yes | No |
| Binary | Yes | No | No | No | No | No | No | Yes | Yes | Yes | No |
| Any | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Null | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Enum | No | No | No | No | No | No | No | No | Yes | Yes | Yes* |
* Enum-to-enum connections require matching enumeration type names.
Related concepts
- Nodes and pins — where types are defined
- Wires — the connections that the type system validates
- Variables — variables follow the same type rules