Skip to content

Commit

Permalink
Merge pull request #19 from ar90n/feature/fix-type-hint-errors
Browse files Browse the repository at this point in the history
fix: Fix type hint errors
  • Loading branch information
ar90n authored May 31, 2022
2 parents 2149fe7 + 24a3cf9 commit 96cea11
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions alfort_dom/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ def _render(_: Any) -> None:
class DomNode(Node, Generic[M]):
dom: HTMLElement
dispatch: Dispatch[M]
handlers: dict[str, Callable[[Any], None]]
handlers: dict[str, Callable[[Any], M]]
listener: JsProxy

def __init__(
self, dom: HTMLElement, dispatch: Dispatch[M] = lambda _: None
) -> None:
def __init__(self, dom: HTMLElement, dispatch: Dispatch[M] | None = None) -> None:
self.dom = dom
self.dispatch = dispatch
self.dispatch = dispatch if dispatch is not None else lambda _: None
self.handlers = {}

def _listener(event: Any) -> None:
Expand Down

0 comments on commit 96cea11

Please sign in to comment.