Peter
How to create a wrapper for SolidJS's setStore in TypeScript?
I have a SolidJS store defined:
I need to run some code before every execution of setStore, so I would like to wrap it with my own function. Is there a way to do that, that preserves all types and all overloads?
So far, the best solution I've (heard)[https://stackoverflow.com/questions/78209469/how-to-create-a-wrapper-for-solidjss-setstore-in-typescript?noredirect=1#comment137881170_78209469] is:
But the error suppression makes it ugly. Is there any clean way to do this?
7 replies