Rename and re-type generateAuthActions export

This commit is contained in:
Kyle Corbelli 2017-09-03 06:50:52 -07:00
parent 57e3e27d08
commit 2a5fbe140c
6 changed files with 11 additions and 9 deletions

4
dist/actions.js vendored
View File

@ -89,7 +89,7 @@ exports.signOutRequestFailed = function () { return ({
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Async Redux Thunk actions:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var theActionsExportThatShouldBeRenamed = function (authUrl) {
var generateAuthActions = function (authUrl) {
var registerUser = function (userRegistrationDetails) { return function (dispatch) {
return __awaiter(this, void 0, void 0, function () {
var firstName, email, password, passwordConfirmation, response, userAttributes, error_1;
@ -238,5 +238,5 @@ var theActionsExportThatShouldBeRenamed = function (authUrl) {
signOutUser: signOutUser,
};
};
exports.default = theActionsExportThatShouldBeRenamed;
exports.default = generateAuthActions;
//# sourceMappingURL=actions.js.map

2
dist/index.js vendored
View File

@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var actions_1 = require("./actions");
exports.theActionsExportThatShouldBeRenamed = actions_1.default;
exports.generateAuthActions = actions_1.default;
var reducers_1 = require("./reducers");
exports.reduxTokenAuthReducer = reducers_1.default;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

4
index.d.ts vendored
View File

@ -1,6 +1,6 @@
import { Reducer } from 'redux'
import { ActionsExport } from './src/types'
import { ActionsGeneratorExport } from './src/types'
export const reduxTokenAuthReducer: Reducer<{}>
export const theActionsExportThatShouldBeRenamed: ActionsExport
export const generateAuthActions: ActionsGeneratorExport

View File

@ -105,7 +105,7 @@ export const signOutRequestFailed = (): SignOutRequestFailedAction => ({
// Async Redux Thunk actions:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const theActionsExportThatShouldBeRenamed = (authUrl: string): ActionsExport => {
const generateAuthActions = (authUrl: string): ActionsExport => {
const registerUser = (
userRegistrationDetails: UserRegistrationDetails,
) => async function (dispatch: Dispatch<{}>): Promise<void> {
@ -221,4 +221,4 @@ const theActionsExportThatShouldBeRenamed = (authUrl: string): ActionsExport =>
}
}
export default theActionsExportThatShouldBeRenamed
export default generateAuthActions

View File

@ -1,8 +1,8 @@
import theActionsExportThatShouldBeRenamed from './actions'
import generateAuthActions from './actions'
import reduxTokenAuthReducer from './reducers'
export {
theActionsExportThatShouldBeRenamed,
generateAuthActions,
reduxTokenAuthReducer,
}

View File

@ -163,3 +163,5 @@ export interface ActionsExport {
readonly signInUser: ReduxAsyncAction
readonly signOutUser: ReduxAsyncAction
}
export type ActionsGeneratorExport = (authUrl: string) => ActionsExport