Try adding types again

This commit is contained in:
Kyle Corbelli 2017-09-03 06:41:20 -07:00
parent 9d51f01861
commit 57e3e27d08
11 changed files with 29 additions and 13 deletions

1
dist/actions.js vendored
View File

@ -89,7 +89,6 @@ exports.signOutRequestFailed = function () { return ({
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Async Redux Thunk actions:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Maybe type this even:
var theActionsExportThatShouldBeRenamed = function (authUrl) {
var registerUser = function (userRegistrationDetails) { return function (dispatch) {
return __awaiter(this, void 0, void 0, function () {

2
dist/actions.js.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyB;AAGzB,iCA+BgB;AAChB,wCAKwB,CAAC,kHAAkH;AAE3I,wHAAwH;AACxH,sBAAsB;AACtB,wHAAwH;AAE3G,QAAA,uBAAuB,GAAG,cAAqC,OAAA,CAAC;IAC3E,IAAI,EAAE,iCAAyB;CAChC,CAAC,EAF0E,CAE1E,CAAA;AAEW,QAAA,4BAA4B,GAAG,UAAC,cAA8B,IAAyC,OAAA,CAAC;IACnH,IAAI,EAAE,sCAA8B;IACpC,OAAO,EAAE;QACP,cAAc,gBAAA;KACf;CACF,CAAC,EALkH,CAKlH,CAAA;AAEW,QAAA,yBAAyB,GAAG,cAAuC,OAAA,CAAC;IAC/E,IAAI,EAAE,mCAA2B;CAClC,CAAC,EAF8E,CAE9E,CAAA;AAEW,QAAA,sBAAsB,GAAG,cAAoC,OAAA,CAAC;IACzE,IAAI,EAAE,iCAAyB;CAChC,CAAC,EAFwE,CAExE,CAAA;AAEW,QAAA,2BAA2B,GAAG,UAAC,cAA8B,IAAwC,OAAA,CAAC;IACjH,IAAI,EAAE,sCAA8B;IACpC,OAAO,EAAE;QACP,cAAc,gBAAA;KACf;CACF,CAAC,EALgH,CAKhH,CAAA;A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AExH,0CAA0C;AAC1C,2DAA2D;AAC3D,wDAAwD;AACxD,EAAE;AACF,wCAAwC;AACxC,2CAA2C;AAC3C,qBAAqB;AACrB,KAAK;AAEL,4EAA4E"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":";;AAAA,+BAGc;AACd,+CAAwC;AAExC,IAAM,qBAAqB,GAAgB,uBAAe,CAAC;IACzD,WAAW,wBAAA;CACZ,CAAC,CAAA;AAEF,kBAAe,qBAAqB,CAAA;AAEpC,wHAAwH;AACxH,4EAA4E;AAC5E,wHAAwH;AAExH,0CAA0C;AAC1C,2DAA2D;AAC3D,wDAAwD;AACxD,EAAE;AACF,wCAAwC;AACxC,2CAA2C;AAC3C,qBAAqB;AACrB,KAAK;AAEL,4EAA4E"}

1
dist/types.js vendored
View File

@ -1,5 +1,4 @@
"use strict";
// Maybe make this the index.ts of a types directory so you can split things up
Object.defineProperty(exports, "__esModule", { value: true });
exports.REGISTRATION_REQUEST_SENT = 'redux-token-auth/REGISTRATION_REQUEST_SENT';
exports.REGISTRATION_REQUEST_SUCCEEDED = 'redux-token-auth/REGISTRATION_REQUEST_SUCCEEDED';

2
dist/types.js.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,+EAA+E;;AAkClE,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,8BAA8B,GAAmC,iDAAiD,CAAA;AAGlH,QAAA,2BAA2B,GAAgC,8CAA8C,CAAA;AAGzG,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,8BAA8B,GAAmC,iDAAiD,CAAA;AAGlH,QAAA,2BAA2B,GAAgC,8CAA8C,CAAA;AAGzG,QAAA,mBAAmB,GAAwB,sCAAsC,CAAA;AAGjF,QAAA,wBAAwB,GAA6B,2CAA2C,CAAA;AAGhG,QAAA,qBAAqB,GAA0B,wCAAwC,CAAA;AAGvF,QAAA,oBAAoB,GAAyB,uCAAuC,CAAA;AAGpF,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,sBAAsB,GAA2B,yCAAyC,CAAA"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAkCa,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,8BAA8B,GAAmC,iDAAiD,CAAA;AAGlH,QAAA,2BAA2B,GAAgC,8CAA8C,CAAA;AAGzG,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,8BAA8B,GAAmC,iDAAiD,CAAA;AAGlH,QAAA,2BAA2B,GAAgC,8CAA8C,CAAA;AAGzG,QAAA,mBAAmB,GAAwB,sCAAsC,CAAA;AAGjF,QAAA,wBAAwB,GAA6B,2CAA2C,CAAA;AAGhG,QAAA,qBAAqB,GAA0B,wCAAwC,CAAA;AAGvF,QAAA,oBAAoB,GAAyB,uCAAuC,CAAA;AAGpF,QAAA,yBAAyB,GAA8B,4CAA4C,CAAA;AAGnG,QAAA,sBAAsB,GAA2B,yCAAyC,CAAA"}

6
index.d.ts vendored Normal file
View File

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

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "redux-token-auth",
"version": "0.1.0",
"version": "0.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,8 +1,9 @@
{
"name": "redux-token-auth",
"version": "0.2.0",
"version": "0.3.0",
"description": "Redux actions and reducers to integrate with Devise Token Auth",
"main": "dist/index.js",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"

View File

@ -1,5 +1,4 @@
import axios from 'axios'
// import { authUrl } from '../../constants' // this has to be passed in by the package user
import { Dispatch } from 'redux'
import {
AuthResponse,
@ -8,6 +7,7 @@ import {
UserRegistrationDetails,
UserSignInCredentials,
UserSignOutCredentials,
ActionsExport,
REGISTRATION_REQUEST_SENT,
REGISTRATION_REQUEST_SUCCEEDED,
REGISTRATION_REQUEST_FAILED,
@ -105,8 +105,7 @@ export const signOutRequestFailed = (): SignOutRequestFailedAction => ({
// Async Redux Thunk actions:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Maybe type this even:
const theActionsExportThatShouldBeRenamed = (authUrl: string) => {
const theActionsExportThatShouldBeRenamed = (authUrl: string): ActionsExport => {
const registerUser = (
userRegistrationDetails: UserRegistrationDetails,
) => async function (dispatch: Dispatch<{}>): Promise<void> {

View File

@ -1,7 +1,10 @@
import { combineReducers } from 'redux'
import {
combineReducers,
Reducer,
} from 'redux'
import currentUser from './current-user'
const reduxTokenAuthReducer = combineReducers({
const reduxTokenAuthReducer: Reducer<{}> = combineReducers({
currentUser,
})

View File

@ -1,4 +1,4 @@
// Maybe make this the index.ts of a types directory so you can split things up
import { Dispatch } from 'redux'
// This one in particular will be a little tough because we don't know what the package user's "User" model looks like:
export interface UserAttributes {}
@ -154,3 +154,12 @@ export type ReduxAction = RegistrationRequestSentAction
| SignOutRequestSentAction
| SignOutRequestSucceededAction
| SignOutRequestFailedAction
export type ReduxAsyncAction = (input: any) => (dispatch: Dispatch<{}>) => Promise<void>
export interface ActionsExport {
readonly registerUser: ReduxAsyncAction
readonly verifyToken: ReduxAsyncAction
readonly signInUser: ReduxAsyncAction
readonly signOutUser: ReduxAsyncAction
}