Skip to content

Commit

Permalink
Format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Mar 20, 2024
1 parent 969edb7 commit f3303a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/bindActionCreators.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { Dispatch } from './types/store'
import type { ActionCreator, ActionCreatorsMapObject, Action } from './types/actions'
import type {
ActionCreator,
ActionCreatorsMapObject,
Action
} from './types/actions'
import { kindOf } from './utils/kindOf'

function bindActionCreator<A extends Action>(
Expand Down
6 changes: 3 additions & 3 deletions src/types/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface Middleware<
S = any,
D extends Dispatch = Dispatch
> {
(api: MiddlewareAPI<D, S>): (
next: (action: unknown) => unknown
) => (action: unknown) => unknown
(
api: MiddlewareAPI<D, S>
): (next: (action: unknown) => unknown) => (action: unknown) => unknown
}
5 changes: 2 additions & 3 deletions src/types/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ export type ReducerFromReducersMapObject<M> = M[keyof M] extends
*
* @template R Type of reducer.
*/
export type ActionFromReducer<R> = R extends Reducer<any, infer A, any>
? A
: never
export type ActionFromReducer<R> =
R extends Reducer<any, infer A, any> ? A : never

/**
* Infer action union type from a `ReducersMapObject`.
Expand Down

0 comments on commit f3303a8

Please sign in to comment.