# Type system overview (https://docs-kyrm16yq7-ton-core-docs.vercel.app/llms/tolk/types/list-of-types/content.md)



Tolk has the following types:

* [numbers](/llms/languages/tolk/types/numbers/content.md) — `int`, `int32`, `uint64`, `coins`, and others.
* [boolean](/llms/languages/tolk/types/booleans/content.md) — `true` and `false`.
* [address](/llms/languages/tolk/types/address/content.md) — `internal`, `external`, and `none`.
* [cells](/llms/languages/tolk/types/cells/content.md) — containers with up to 1023 bits of data and up to 4 references to other cells, plus the cell manipulation primitives of TVM: [builders and slices](/llms/tvm/builders-and-slices/content.md).
* [structures](/llms/languages/tolk/types/structures/content.md) — multiple fields grouped into one entity.
* [generics](/llms/languages/tolk/types/generics/content.md) — any struct can be generic `<T>`.
* [enums](/llms/languages/tolk/types/enums/content.md) — distinct types containing integer variants.
* [nullable types](/llms/languages/tolk/types/nullable/content.md) — `null` safety and safe casts.
* [union types](/llms/languages/tolk/types/unions/content.md) — variables holding one of several possible values.
* [strings](/llms/languages/tolk/types/strings/content.md) — string values stored as snake-encoded cells.
* [tensors](/llms/languages/tolk/types/tensors/content.md) — multiple values placed sequentially on the stack.
* [arrays](/llms/languages/tolk/types/tuples/content.md) — dynamically sized containers backed by TVM tuples.
* [maps](/llms/languages/tolk/types/maps/content.md) — key-value dictionaries.
* [callables](/llms/languages/tolk/types/callables/content.md) — first-class functions.
* [unknown](/llms/languages/tolk/types/unknown/content.md) — any value that is a single-slot TVM primitive.
* [`void` and `never`](/llms/languages/tolk/types/void-never/content.md) — both represent the absence of a value.

To make an interchangeable alias for an existing type, including structural types, there are [type aliases](/llms/languages/tolk/types/aliases/content.md).

Smart contracts run on a stack-based virtual machine, [TVM](/llms/tvm/overview/content.md), which imposes specific rules on how values are represented at runtime. For example, [strings](/llms/languages/tolk/types/strings/content.md) are stored as snake-encoded cells, because TVM has no native string support.

All on-chain data and communication rely entirely on [cells](/llms/languages/tolk/types/cells/content.md), so the type system focuses on binary serialization and clear data relationships:

* [Type checks and casts](/llms/languages/tolk/types/type-checks-and-casts/content.md) covers casting with the unsafe `as` operator.
* [TVM stack representation](/llms/languages/tolk/types/overall-tvm-stack/content.md) summarizes how types map to the TVM stack.
* [Serialization](/llms/languages/tolk/types/overall-serialization/content.md) describes how types serialize and relate to [TL-B](/llms/languages/tl-b/overview/content.md).
