SatoshiKawabata / parcel-hyperapp-typescript

7 stars 2 forks source link

Writing actions tests without an app/document, getting TS error #1

Open pauleveritt opened 6 years ago

pauleveritt commented 6 years ago

First, thanks for putting together this repo. It convinced me to give HyperApp+TS a try with Parcel.

I want to write unit tests on actions which don't assemble an app or a document. Invoking the actions directly, though, gives a TypeScript error: TS2349: Cannot invoke an expression whose type lacks a call signature.

Here's a reproducible case in a gist, with the text of the

https://gist.github.com/pauleveritt/b214a3c207b7779a4ae0ec1690c68139

pauleveritt commented 6 years ago

I received some help in the HyperApp channel about the correct way to write such tests. I can submit a PR if you'd like.

Or if you don't intend to update this repo, that's fine also.