Skip to content

Commit

Permalink
chore(vanilla): mark op unstable and internal (#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Oct 15, 2024
1 parent 487ded5 commit b52290a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ type Op =
| [op: 'delete', path: Path, prevValue: unknown]
type Listener = (op: Op, nextVersion: number) => void

export type INTERNAL_Op = Op

type Primitive = string | number | boolean | null | undefined | symbol | bigint

type SnapshotIgnore =
Expand Down Expand Up @@ -269,7 +271,7 @@ export function getVersion(proxyObject: unknown): number | undefined {

export function subscribe<T extends object>(
proxyObject: T,
callback: (ops: Op[]) => void,
callback: (unstable_ops: Op[]) => void,
notifyInSync?: boolean,
): () => void {
const proxyState = proxyStateMap.get(proxyObject as object)
Expand Down

0 comments on commit b52290a

Please sign in to comment.