t
A runtime type checker: build a check once, validate any value with a clear error message.
t is Osyris's runtime type checker for Roblox, published to Wally with a few newer data types added. Every function returns a check (value) -> (boolean, string?), and checks compose: t.interface, t.tuple, t.union, t.optional, t.instanceOf and dozens more. Use it to validate remote arguments, config tables and DataStore payloads, and to make Predicates type-aware.
Use it when
- You need to validate what a client sent before trusting it.
- You want readable, composable schema checks for configuration and saved data.
Install
Studio Wally
Using the Studio Wally plugin:
- Open the widget.
- Search
kashtheking/t. - Press download and choose Shared module (recommended for almost every package).
Wally
Add this to the [dependencies] section of your wally.toml, then run wally install:
t = "kashtheking/t@1.0.0"
local t = require(ReplicatedStorage.Packages.t)
Dependencies
None. The package is a single module with no dependencies.
Credits
t was created by Osyris (osyrisrblx/t, MIT). This is his library published to Wally as kashtheking/t, with checks for newer Roblox data types added by KashTheKing.
API
Every constructor, method, property and type is documented on the t API page, generated from the doc comments in init.luau. Each entry links to its line in the source.
Help
Questions and bug reports: the Discord or a GitHub issue. See Help & contact for everything else.