All files / json-crdt-patch/builder DelayedValueBuilder.ts

80% Statements 4/5
100% Branches 0/0
50% Functions 1/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14                174x 42900x     174x  
import type {PatchBuilder} from '../PatchBuilder';
import type {ITimestampStruct} from '../clock';
 
export type NodeBuilderCallback = (builder: PatchBuilder) => ITimestampStruct;
 
/**
 * @category Patch
 */
export class NodeBuilder {
  constructor(public readonly build: NodeBuilderCallback) {}
}
 
export const delayed = (build: NodeBuilderCallback) => new NodeBuilder(build);