BLUE
PHP 7.4.33
Path:
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/redux/src
Run
Logout
Edit File
Size: 2.69 KB
Close
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/redux/src/bindActionCreators.ts
Text
Base64
import { Dispatch } from './types/store' import { ActionCreator, ActionCreatorsMapObject, Action } from './types/actions' import { kindOf } from './utils/kindOf' function bindActionCreator<A extends Action>( actionCreator: ActionCreator<A>, dispatch: Dispatch<A> ) { return function (this: any, ...args: any[]) { return dispatch(actionCreator.apply(this, args)) } } /** * Turns an object whose values are action creators, into an object with the * same keys, but with every function wrapped into a `dispatch` call so they * may be invoked directly. This is just a convenience method, as you can call * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. * * For convenience, you can also pass an action creator as the first argument, * and get a dispatch wrapped function in return. * * @param actionCreators An object whose values are action * creator functions. One handy way to obtain it is to use `import * as` * syntax. You may also pass a single function. * * @param dispatch The `dispatch` function available on your Redux * store. * * @returns The object mimicking the original object, but with * every action creator wrapped into the `dispatch` call. If you passed a * function as `actionCreators`, the return value will also be a single * function. */ export default function bindActionCreators<A, C extends ActionCreator<A>>( actionCreator: C, dispatch: Dispatch ): C export default function bindActionCreators< A extends ActionCreator<any>, B extends ActionCreator<any> >(actionCreator: A, dispatch: Dispatch): B export default function bindActionCreators< A, M extends ActionCreatorsMapObject<A> >(actionCreators: M, dispatch: Dispatch): M export default function bindActionCreators< M extends ActionCreatorsMapObject, N extends ActionCreatorsMapObject >(actionCreators: M, dispatch: Dispatch): N export default function bindActionCreators( actionCreators: ActionCreator<any> | ActionCreatorsMapObject, dispatch: Dispatch ) { if (typeof actionCreators === 'function') { return bindActionCreator(actionCreators, dispatch) } if (typeof actionCreators !== 'object' || actionCreators === null) { throw new Error( `bindActionCreators expected an object or a function, but instead received: '${kindOf( actionCreators )}'. ` + `Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?` ) } const boundActionCreators: ActionCreatorsMapObject = {} for (const key in actionCreators) { const actionCreator = actionCreators[key] if (typeof actionCreator === 'function') { boundActionCreators[key] = bindActionCreator(actionCreator, dispatch) } } return boundActionCreators }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
types
DIR
-
drwxr-xr-x
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils
DIR
-
drwxr-xr-x
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
applyMiddleware.ts
3.00 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bindActionCreators.ts
2.69 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
combineReducers.ts
6.74 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
compose.ts
1.53 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
createStore.ts
17.13 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
1.21 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).