Conversation
Adds practical and convenient type when using the `createStore`'s return type externally, without the hassle of implementing it by hand.
|
|
This seems reasonable.. just thinking about naming.. Do the other Signal accessor pair have a name? Maybe consistent naming won't be possible until 2.0. Would love someone who looks at the TS conventions of this repo take a look. |
|
The current return type of type SignalBundle<T> = [get: SignalAccessor<T>, set: SignalSetter<T>] |
Summary
Here I added
StoreBundle<T>; a useful type extracted directly from thecreateStorefunction's return type:type StoreBundle<T> = [get: Store<T>, set: SetStoreFunction<T>]How did you test this change?
This type is identical to the return type of the
createStorefunction, so nothing really should change, besides the fact that it's definitely more portable, more compact, and depending on who we ask, more readable.All tests have been successfully ran, though.