Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Actions not recognized when using ActionTree #1461
Steps to reproduce
There's no need to run anything, just open the repo in VSCode, and you will see the error. I've added comments to make it clear
What is expected?
When I create an
What is actually happening?
When I type my actions to be of type
I've created constants to be used as names for my actions (so that I don't use strings). At first, I though that is what's causing the problem; that's why I created the 'hello()' function to test, and it seems to me the constants are not an issue here.
const action = typeSafeActions.hello as Function action()
Thank you @ktsn for your answer. I don't know if I'm missing something here, but I found it too much of a hassle if every time I need to manually specify the type of my action to be able to test them.
Just casting as
@kktsn Can you please provide some reference on how to test