Skip to content

Commit

Permalink
Fix typechecking for interactors/core
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Lazarev <[email protected]>
  • Loading branch information
wKich committed Sep 1, 2023
1 parent 41a7eca commit 5936572
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/popular-geese-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@interactors/core": patch
---

Fix type checking
2 changes: 1 addition & 1 deletion packages/core/src/inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createInspector<IC extends InteractorConstructor<any, any, any,
let elements = findElements<GetElement<IC>>(parentElement ?? unsafeSyncResolveParent(options), options);
return elements.map(
element => (Object.assign(
instantiateInteractor(options, () => element) as (Interactor<GetElement<IC>, Filters<GetFilters<IC>>> & GetActions<IC>), {
instantiateInteractor(options, () => element) as unknown as (Interactor<GetElement<IC>, Filters<GetFilters<IC>>> & GetActions<IC>), {
element,
find<T extends InteractorConstructor<any, any, any, any>>(constructor: T): Inspector<T> {
return createInspector(constructor, element)
Expand Down

0 comments on commit 5936572

Please sign in to comment.