From f7defd9a67bcc4e3b8ab848ed3b85d4e57d05d19 Mon Sep 17 00:00:00 2001 From: Peter van Hardenberg Date: Mon, 6 May 2024 16:22:44 -0700 Subject: [PATCH] quiet type checker --- packages/automerge-repo-react-hooks/src/useHandle.ts | 2 -- packages/automerge-repo-react-hooks/test/useDocument.test.tsx | 2 +- packages/automerge-repo-react-hooks/test/useHandle.test.tsx | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/automerge-repo-react-hooks/src/useHandle.ts b/packages/automerge-repo-react-hooks/src/useHandle.ts index bf9761434..9ea077c09 100644 --- a/packages/automerge-repo-react-hooks/src/useHandle.ts +++ b/packages/automerge-repo-react-hooks/src/useHandle.ts @@ -1,9 +1,7 @@ import { AnyDocumentId, DocHandle, - interpretAsDocumentId, } from "@automerge/automerge-repo" -import { useEffect, useState } from "react" import { useRepo } from "./useRepo.js" /** A hook which returns a {@link DocHandle} identified by a URL. diff --git a/packages/automerge-repo-react-hooks/test/useDocument.test.tsx b/packages/automerge-repo-react-hooks/test/useDocument.test.tsx index 4738b9e1c..8286972cd 100644 --- a/packages/automerge-repo-react-hooks/test/useDocument.test.tsx +++ b/packages/automerge-repo-react-hooks/test/useDocument.test.tsx @@ -59,7 +59,7 @@ describe("useDocument", () => { url, onDoc, }: { - url: AutomergeUrl + url: AutomergeUrl | undefined onDoc: (doc: ExampleDoc) => void }) => { const [doc] = useDocument(url) diff --git a/packages/automerge-repo-react-hooks/test/useHandle.test.tsx b/packages/automerge-repo-react-hooks/test/useHandle.test.tsx index 25958d842..d99e89240 100644 --- a/packages/automerge-repo-react-hooks/test/useHandle.test.tsx +++ b/packages/automerge-repo-react-hooks/test/useHandle.test.tsx @@ -45,7 +45,7 @@ describe("useHandle", () => { url, onHandle, }: { - url: AutomergeUrl + url: AutomergeUrl | undefined onHandle: (handle: DocHandle | undefined) => void }) => { const handle = useHandle(url)