matthewp / robot

🤖 A functional, immutable Finite State Machine library

Home Page:https://thisrobot.life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invoke typescript definition issue

jackmellis opened this issue · comments

commented

I just upgraded from 0.2.18 to 0.2.19 and got hit by a tonne of typescript issues for invoke.

It looks like the args have been tightened up from ...any[] to fn: (ctx) => Promise

v0.2.18...v0.2.19#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8R102

But from my usage (unless this has changed) the function passed to invoke also takes an event argument?

Mind sending a pR?

Same here. A lot of confusion. How to fix this?

This is the commit. But here I see two invoke definitions... aa34adf#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8