Skip to content

Commit

Permalink
fix: Fix Types
Browse files Browse the repository at this point in the history
  • Loading branch information
William Luke committed Sep 20, 2019
1 parent 08a3920 commit b367b99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-auth0",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/index.js",
"module": "dist/useauth0.esm.js",
"typings": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/AuthProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { createContext, useReducer, useEffect, useState } from "react";
import Auth0, { Auth0UserProfile, Auth0DecodedHash, Auth0Error } from "auth0-js";
import Auth0, { Auth0UserProfile, Auth0DecodedHash, Auth0Error, WebAuth } from "auth0-js";

import { authReducer, AuthReducerAction } from "./authReducer";
import { handleAuthResult } from "./useAuth";
Expand All @@ -15,7 +15,7 @@ export interface AuthState {
export interface AuthContextState {
state: AuthState;
dispatch: React.Dispatch<AuthReducerAction>;
auth0: Auth0.WebAuth;
auth0: WebAuth;
callback_domain: string;
navigate: any;
}
Expand Down
8 changes: 4 additions & 4 deletions src/useAuth.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useContext } from "react";
import Auth0, { Auth0DecodedHash } from "auth0-js";
import { Auth0DecodedHash, Auth0ParseHashError, Auth0Error, WebAuth } from "auth0-js";

import { AuthContext } from "./AuthProvider";
import { AuthReducerAction } from 'authReducer';
interface SetSession {
dispatch: React.Dispatch<AuthReducerAction>;
auth0: Auth0.WebAuth;
auth0: WebAuth;
authResult: Auth0DecodedHash;
}

Expand All @@ -31,9 +31,9 @@ async function setSession({ dispatch, auth0, authResult }: SetSession) {
});
}
interface HandleAuthResult {
err?: Auth0.Auth0Error | Auth0.Auth0ParseHashError | null;
err?: Auth0Error | Auth0ParseHashError | null;
dispatch: React.Dispatch<AuthReducerAction>;
auth0: Auth0.WebAuth;
auth0: WebAuth;
authResult: Auth0DecodedHash | null;
}
export const handleAuthResult = async ({
Expand Down

0 comments on commit b367b99

Please sign in to comment.