diff --git a/packages/gatsby/src/redux/actions/index.js b/packages/gatsby/src/redux/actions/index.js deleted file mode 100644 index 9c35f0469905b..0000000000000 --- a/packages/gatsby/src/redux/actions/index.js +++ /dev/null @@ -1,25 +0,0 @@ -const { bindActionCreators } = require(`redux`) -const { store } = require(`..`) - -import * as internalActions from "./internal" -const { actions: publicActions } = require(`./public`) -const { - actions: restrictedActions, - availableActionsByAPI, -} = require(`./restricted`) - -exports.internalActions = internalActions -exports.publicActions = publicActions -exports.restrictedActions = restrictedActions -exports.restrictedActionsAvailableInAPI = availableActionsByAPI - -const actions = { - ...internalActions, - ...publicActions, - ...restrictedActions, -} - -exports.actions = actions - -// Deprecated, remove in v3 -exports.boundActionCreators = bindActionCreators(actions, store.dispatch) diff --git a/packages/gatsby/src/redux/actions/index.ts b/packages/gatsby/src/redux/actions/index.ts new file mode 100644 index 0000000000000..c3b86fb8eda3c --- /dev/null +++ b/packages/gatsby/src/redux/actions/index.ts @@ -0,0 +1,23 @@ +import { bindActionCreators } from "redux" + +import { store } from ".." + +import * as internalActions from "./internal" +import { actions as publicActions } from "./public" +import { + actions as restrictedActions, + availableActionsByAPI, +} from "./restricted" + +export const actions = { + ...internalActions, + ...publicActions, + ...restrictedActions, +} + +// Deprecated, remove in v3 +export const boundActionCreators = bindActionCreators(actions, store.dispatch) + +export const restrictedActionsAvailableInAPI = availableActionsByAPI + +export { internalActions, publicActions, restrictedActions }