File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @stackflow/core " : patch
3+ ---
4+
5+ Made ` divideBy ` to be friendly to type inference.
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export function makeCoreStore(options: MakeCoreStoreOptions): CoreStore {
6161 initialEvents,
6262 initialContext : options . initialContext ?? { } ,
6363 } ) ?? initialEvents ,
64- initialPushedEventsByOption as ( PushedEvent | StepPushedEvent ) [ ] ,
64+ initialPushedEventsByOption ,
6565 ) ;
6666
6767 const isInitialActivityIgnored =
Original file line number Diff line number Diff line change 1- export const divideBy = < T > (
1+ export const divideBy = < T , U extends T > (
22 arr : T [ ] ,
3- predicate : ( t : T ) => boolean ,
4- ) : [ T [ ] , T [ ] ] => {
5- const satisfied : T [ ] = [ ] ;
3+ predicate : ( t : T ) => t is U ,
4+ ) : [ U [ ] , T [ ] ] => {
5+ const satisfied : U [ ] = [ ] ;
66 const unsatisfied : T [ ] = [ ] ;
77
88 arr . forEach ( ( element ) => {
You can’t perform that action at this time.
0 commit comments