
A powerful toolkit for static analysis, symbolic testing, and phantom type operations. Build type-safe applications with confidence using composable constraints and static proofs.
Typist is a minimal, compositional, and debug-friendly suite of type-level utilities designed for static analysis , symbolic testing , and phantom type operations in TypeScript.
It treats types as first-class values , leveraging TypeScript's structural type system to encode symbolic verdicts , composable constraints , and static proofs .
Here's a quick taste of what typist can do. This example shows how to create phantom types for type-safe domain modeling:
// Basic phantom value creation examples
import { t_, type_, t } from '@type-first/typist';
// Create phantom values for any type
const user = t_<{ name: string; age: number }>();
const id = t_<string>();
const config = t_<{ theme: 'dark' | 'light' }>();
// All equivalent ways to create phantom values
const value1 = t_<string>();
const value2 = type_<string>();
const value3 = t<string>();
// Complex types work too
type ApiResponse<T> = {
data: T;
status: number;
message: string;
};
const response = t_<ApiResponse<User>>();
// Use phantom values for type-level operations
type UserType = typeof user; // { name: string; age: number }Create nominal types without runtime overhead for safer domain modeling.
Compile-time validation with rich error reporting. (Coming soon)
Utilities for type-level comparisons and transformations. (Coming soon)
Static assertions for comprehensive type testing. (Coming soon)
Master typist concepts through hands-on practice with our interactive scenarios in the Type Explorer:
Learn the fundamentals of phantom types and type-level programming with typist. Create phantom values and build branded types.
Master type-level comparisons using $Equal, $Extends, and the verdict system. Learn to create compile-time assertions.
Explore advanced type-level programming patterns. Build complex type computations, state machines, and compile-time proofs.