Spice up your TypeScript
ts-lombok-kit is a TypeScript library that automatically plugs into your editor and build tools, eliminating boilerplate code through compile-time AST transformations. Never write another getter again.
Write Less, Do More
See how ts-lombok-kit transforms verbose boilerplate into clean, declarative code.
1class User {2 private id: number;3 private name: string;4 private email: string;56 constructor(id: number, name: string, email: string) {7 this.id = id;8 this.name = name;9 this.email = email;10 }1112 getId(): number { return this.id; }13 setId(id: number): void { this.id = id; }14 getName(): string { return this.name; }15 setName(name: string): void { this.name = name; }16 getEmail(): string { return this.email; }17 setEmail(email: string): void { this.email = email; }1819 toString(): string {20 return `User(id=${this.id}, name=${this.name}, email=${this.email})`;21 }2223 equals(other: User): boolean {24 return this.id === other.id &&25 this.name === other.name &&26 this.email === other.email;27 }2829 hashCode(): number {30 // ... implementation31 }32}1import { Data } from 'ts-lombok-kit/markers';23@Data4class User {5 id: number;6 name: string;7 email: string;8}910// That's it! All methods are generated at compile time.Powerful Features
Everything you need to eliminate boilerplate and write cleaner TypeScript code.
Zero Runtime Cost
All transformations happen at compile time. No runtime overhead, no extra dependencies in production.
Type-Safe
Full TypeScript support with proper type inference. Your IDE will understand all generated methods.
Immutable Patterns
@Record, @Value, and @With decorators for creating immutable data classes with ease.
Builder Pattern
@Builder generates a fluent builder API for complex object construction.
Boilerplate Reduction
@Data, @Getter, @Setter, @ToString, @Equals - generate common methods automatically.
Design Patterns
@Singleton, @Log, and constructor variants for common patterns out of the box.
Combine Decorators for Full Power
Mix and match decorators to get exactly the functionality you need. Create immutable records with builders and withers in just a few lines.
@Recordfor immutability@Builderfor fluent construction@Withfor immutable updates
1import { Record, Builder, With } from 'ts-lombok-kit/markers';23@Record4@Builder5@With6class Product {7 id: number;8 name: string;9 price: number;10}1112// Create with builder13const product = Product.builder()14 .id(1)15 .name('Widget')16 .price(9.99)17 .build();1819// Immutable update20const updated = product.withPrice(19.99);2122console.log(product.toString());23// Product(id=1, name=Widget, price=9.99)Available Decorators
A comprehensive set of decorators covering common patterns and boilerplate.
| Decorator | Type | Description |
|---|---|---|
@Record | Class | Immutable data carrier (constructor, readonly, freeze, toString) |
@Data | Class | @Getter + @Setter + @ToString + @Equals + @AllArgsConstructor |
@Builder | Class | Generate builder pattern with fluent API |
@Getter / @Setter | Class | Generate accessor methods |
@With | Class | Generate withX() methods for immutable updates |
@Singleton | Class | Singleton pattern with getInstance() |
Ready to eliminate boilerplate?
Get started with ts-lombok-kit in minutes. Zero runtime cost, full TypeScript support.