From b52290aa3bf4dcdac850d12952f07a313a950f16 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Tue, 15 Oct 2024 19:54:07 +0900 Subject: [PATCH] chore(vanilla): mark op unstable and internal (#973) --- src/vanilla.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vanilla.ts b/src/vanilla.ts index 40dbcd00..32430930 100644 --- a/src/vanilla.ts +++ b/src/vanilla.ts @@ -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 = @@ -269,7 +271,7 @@ export function getVersion(proxyObject: unknown): number | undefined { export function subscribe( proxyObject: T, - callback: (ops: Op[]) => void, + callback: (unstable_ops: Op[]) => void, notifyInSync?: boolean, ): () => void { const proxyState = proxyStateMap.get(proxyObject as object)