Create an object type with named properties.
Objects are the primary way to define structured data in Delta-Pack. Properties are encoded in definition order. This is a "named type" that can be used as the root type for load or referenced by other types using ReferenceType.
The type name (must start with uppercase, e.g., "Player")
Record of property names to their types
const Player = ObjectType("Player", { name: StringType(), score: IntType({ min: 0 }), isActive: BooleanType(), inventory: ArrayType(StringType()),});const api = load(Player); Copy
const Player = ObjectType("Player", { name: StringType(), score: IntType({ min: 0 }), isActive: BooleanType(), inventory: ArrayType(StringType()),});const api = load(Player);
Create an object type with named properties.
Objects are the primary way to define structured data in Delta-Pack. Properties are encoded in definition order. This is a "named type" that can be used as the root type for load or referenced by other types using ReferenceType.