From 5936572ac39174a3cdc397faec383eac68259544 Mon Sep 17 00:00:00 2001 From: Dmitriy Lazarev Date: Fri, 1 Sep 2023 12:20:54 +0400 Subject: [PATCH] Fix typechecking for interactors/core Signed-off-by: Dmitriy Lazarev --- .changeset/popular-geese-bow.md | 5 +++++ packages/core/src/inspector.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/popular-geese-bow.md diff --git a/.changeset/popular-geese-bow.md b/.changeset/popular-geese-bow.md new file mode 100644 index 00000000..1a406e30 --- /dev/null +++ b/.changeset/popular-geese-bow.md @@ -0,0 +1,5 @@ +--- +"@interactors/core": patch +--- + +Fix type checking diff --git a/packages/core/src/inspector.ts b/packages/core/src/inspector.ts index 74ba3052..10e34ee6 100644 --- a/packages/core/src/inspector.ts +++ b/packages/core/src/inspector.ts @@ -31,7 +31,7 @@ export function createInspector>(parentElement ?? unsafeSyncResolveParent(options), options); return elements.map( element => (Object.assign( - instantiateInteractor(options, () => element) as (Interactor, Filters>> & GetActions), { + instantiateInteractor(options, () => element) as unknown as (Interactor, Filters>> & GetActions), { element, find>(constructor: T): Inspector { return createInspector(constructor, element)