From 7adb43190556229574b036b3ccb9784651bd9139 Mon Sep 17 00:00:00 2001 From: panu Date: Thu, 4 Jul 2024 05:49:29 +0300 Subject: [PATCH] fix: declare explicit return type for getNode (#16) --- packages/history-utility/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/history-utility/src/index.ts b/packages/history-utility/src/index.ts index 7427781..935ff4f 100644 --- a/packages/history-utility/src/index.ts +++ b/packages/history-utility/src/index.ts @@ -182,7 +182,7 @@ export function proxyWithHistory( * @param index * @returns historyNode */ - getNode: (index: number) => { + getNode: (index: number): HistoryNode | undefined => { const node = proxyObject.history.nodes[index]; return node ? { ...node, snapshot: proxyObject.clone(node.snapshot) }