API reference › @evolu/common › Types › Callback
type Callback<T> = (value: T) => void;
Defined in: packages/common/src/Types.ts:22
A function that receives a value and returns nothing.
Use for event handlers, observers, and async completion handlers.
Example
const onComplete: Callback<string> = (value) => console.log(value);
const queue = new Set<Callback<Result<Data, Error>>>();