Skip to content

Commit

Permalink
feat(replicache): Export MakeMutator (#2088)
Browse files Browse the repository at this point in the history
and MakeMutators. They are needed for Reflect
  • Loading branch information
arv authored Jul 30, 2024
1 parent f830d10 commit 1037690
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/replicache/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export {TEST_LICENSE_KEY} from '@rocicorp/licensing/src/client';
export {consoleLogSink} from '@rocicorp/logger';
export type {LogLevel, LogSink} from '@rocicorp/logger';
export type {MaybePromise} from 'shared/src/types.js';
export type {
JSONObject,
JSONValue,
ReadonlyJSONObject,
ReadonlyJSONValue,
} from 'shared/src/json.js';
export type {MaybePromise} from 'shared/src/types.js';
export type {
Diff as ExperimentalDiff,
DiffOperation as ExperimentalDiffOperation,
Expand Down Expand Up @@ -106,6 +106,8 @@ export type {
WriteTransaction,
} from './transactions.js';
export type {
MakeMutator,
MakeMutators,
MutatorDefs,
MutatorReturn,
Poke,
Expand Down
3 changes: 2 additions & 1 deletion packages/replicache/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {MaybePromise} from 'shared/src/types.js';
import type {Hash} from './hash.js';
import type {ReadonlyJSONValue, WriteTransaction} from './mod.js';
import type {PullResponseV1, PullResponseV1Internal} from './puller.js';
import type {ReadTransactionImpl} from './transactions.js';
import type {MaybePromise} from 'shared/src/types.js';

export type BeginPullResult = {
requestID: string;
Expand Down Expand Up @@ -36,6 +36,7 @@ export type MutatorDefs = {
args?: any,
) => MutatorReturn;
};

export type MakeMutator<
F extends (
tx: WriteTransaction,
Expand Down

0 comments on commit 1037690

Please sign in to comment.