Chuks Language Data Types
Source: Dev.to

Stop fighting your data. Let dataType win.
Overview
chuks dataType is a lightweight, fields‑only container. No constructor boilerplate. No class overhead. Initialize with a map literal and the compiler checks every field.

Validation (@validate)
Attach validation rules directly to fields. Call validate(x) and get back every error—no third‑party library, no schema duplication. The rules live with your data.

Custom Validators
Write a function, annotate it with @validator, and reuse it across any dataType, even in imported modules. Example: a strongPassword rule.

Nullable Types + Type Narrowing
Append ? to any type to allow null. After a null guard, the compiler automatically narrows the type—no casts, no optional‑chaining syntax required.
Embedding
Embed one dataType inside another; its fields are promoted directly, mirroring Go’s embedding model without the verbosity. Ideal for patterns like Auditable, Identifiable, or any shared schema.

JSON Renaming (@json)
Keep internal field names clean while exposing a different wire format. A single annotation handles both serialization and parsing—no extra mapping layer needed.

Resources
- Official site:
- Follow on X:
- Community forum: