Function prepareMockRecorderKitMakers
- prepareMockRecorderKitMakers(): {
makeDurablePublishKit: ((...args: [options: {
valueDurability: undefined | "mandatory";
}]) => GuardedKit<{
publisher: {
fail(reason: any): void;
finish(finalValue: any): void;
publish(value: any): void;
};
subscriber: {
getUpdateSince(updateCount: any): any;
subscribeAfter(publishCount?: bigint): Promise<any>;
};
}>);
makeERecorderKit: (<T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T>) => EventualRecorderKit<T>);
makeRecorder: ((...args: [publisher: Publisher<unknown>, storageNode: DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape: TypedPattern<any>]) => Guarded<{
getStorageNode(): DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>;
getStoragePath(): Promise<string>;
write(value: any): Promise<void>;
writeFinal(value: any): Promise<void>;
}>);
makeRecorderKit: (<T>(storageNode: StorageNode | DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape?: TypedPattern<T>) => RecorderKit<T>);
storageNode: StorageNode & {
countSetValueCalls: (() => number);
};
} Returns {
makeDurablePublishKit: ((...args: [options: {
valueDurability: undefined | "mandatory";
}]) => GuardedKit<{
publisher: {
fail(reason: any): void;
finish(finalValue: any): void;
publish(value: any): void;
};
subscriber: {
getUpdateSince(updateCount: any): any;
subscribeAfter(publishCount?: bigint): Promise<any>;
};
}>);
makeERecorderKit: (<T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T>) => EventualRecorderKit<T>);
makeRecorder: ((...args: [publisher: Publisher<unknown>, storageNode: DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape: TypedPattern<any>]) => Guarded<{
getStorageNode(): DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>;
getStoragePath(): Promise<string>;
write(value: any): Promise<void>;
writeFinal(value: any): Promise<void>;
}>);
makeRecorderKit: (<T>(storageNode: StorageNode | DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape?: TypedPattern<T>) => RecorderKit<T>);
storageNode: StorageNode & {
countSetValueCalls: (() => number);
};
}
makeDurablePublishKit: ((...args: [options: {
valueDurability: undefined | "mandatory";
}]) => GuardedKit<{
publisher: {
fail(reason: any): void;
finish(finalValue: any): void;
publish(value: any): void;
};
subscriber: {
getUpdateSince(updateCount: any): any;
subscribeAfter(publishCount?: bigint): Promise<any>;
};
}>)
- (...args): GuardedKit<{
publisher: {
fail(reason: any): void;
finish(finalValue: any): void;
publish(value: any): void;
};
subscriber: {
getUpdateSince(updateCount: any): any;
subscribeAfter(publishCount?: bigint): Promise<any>;
};
}> Parameters
Rest
...args: [options: {
valueDurability: undefined | "mandatory";
}]
Returns GuardedKit<{
publisher: {
fail(reason: any): void;
finish(finalValue: any): void;
publish(value: any): void;
};
subscriber: {
getUpdateSince(updateCount: any): any;
subscribeAfter(publishCount?: bigint): Promise<any>;
};
}>
makeERecorderKit: (<T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T>) => EventualRecorderKit<T>)
- <T>(storageNodeP, valueShape?): EventualRecorderKit<T>
Parameters
- storageNodeP: ERef<StorageNode>
Optional
valueShape: TypedPattern<T>
makeRecorder: ((...args: [publisher: Publisher<unknown>, storageNode: DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape: TypedPattern<any>]) => Guarded<{
getStorageNode(): DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>;
getStoragePath(): Promise<string>;
write(value: any): Promise<void>;
writeFinal(value: any): Promise<void>;
}>)
- (...args): Guarded<{
getStorageNode(): DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>;
getStoragePath(): Promise<string>;
write(value: any): Promise<void>;
writeFinal(value: any): Promise<void>;
}> Parameters
Rest
...args: [publisher: Publisher<unknown>, storageNode: DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape: TypedPattern<any>]
Returns Guarded<{
getStorageNode(): DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>;
getStoragePath(): Promise<string>;
write(value: any): Promise<void>;
writeFinal(value: any): Promise<void>;
}>
makeRecorderKit: (<T>(storageNode: StorageNode | DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>, valueShape?: TypedPattern<T>) => RecorderKit<T>)
- <T>(storageNode, valueShape?): RecorderKit<T>
Parameters
- storageNode: StorageNode | DataOnly<StorageNode> & RemotableBrand<DataOnly<StorageNode>, StorageNode>
Optional
valueShape: TypedPattern<T>
storageNode: StorageNode & {
countSetValueCalls: (() => number);
}
For use in tests