API reference › @evolu/common › Result › Done
Defined in: packages/common/src/Result.ts:789
A signal indicating normal completion of a pull-based protocol.
This is not a failure — it is a control signal that carries an optional
"done" value (often void, but can be a final summary or leftover).
Inspired by JavaScript's IteratorResult where { done: true } signals
completion.
Example
import { assertEqual, assertType, done, type Done } from "@evolu/common";
const withoutValue = done();
const withValue = done(42);
assertType<typeof withoutValue, Done<void>>();
assertType<typeof withValue, Done<number>>();
assertEqual(withoutValue, { type: "Done", done: undefined });
assertEqual(withValue, { type: "Done", done: 42 });
Extends
Typed<"Done">
Properties
done
readonly done: D;
Defined in: packages/common/src/Result.ts:790
type
readonly type: "Done";
Defined in: packages/common/src/Type.ts:14201