Isolated Workers
Type-Safe Worker Processes
Build isolated worker processes with end-to-end type safety.
Message contracts, not callbacks.
import { DefineMessages } from 'isolated-workers'
export type Messages = DefineMessages<{
ping: {
payload: { message: string };
result: { message: string };
};
}>;
Why isolated-workers?
A modern approach to worker processes with the developer experience you deserve.
End-to-End Type Safety
Define message contracts once and get full type inference on both host and worker sides.
True Process Isolation
Each worker runs in its own process with proper isolation and crash recovery.
Request/Response Pattern
Simple async/await interface with automatic message correlation and timeout handling.
Custom Serialization
Bring your own serializer. Built-in support for JSON, msgpack, and more.
TypeScript First
Built from the ground up with TypeScript. No runtime type checking required.
Zero Dependencies
Lightweight core with no external dependencies. Just pure TypeScript.
Ready to dive in?
Explore our examples to see isolated-workers in action, or jump straight into the documentation.