fix return types

This commit is contained in:
Laurenz Rausche 2024-05-10 20:16:08 +00:00
parent 8abca8466f
commit 9ab04b94e4
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@auth-tools/client",
"version": "0.0.1-alpha.3",
"version": "0.0.1-alpha.4",
"description": "A structured authentication protocol for Javascript. (client)",
"main": "dist/index.js",
"repository": "https://github.com/auth-tools/auth-tools",

View File

@ -3,6 +3,7 @@ import {
AuthProtocol,
AuthRequest,
AuthResponse,
Promisify,
UseEventCallbacks,
User,
} from "@auth-tools/base";
@ -22,7 +23,7 @@ type MethodReturn<MethodName extends keyof AuthProtocol> =
export type AuthClientConnector<MethodName extends keyof AuthProtocol> = (
method: MethodName,
data: AuthRequest<MethodName>
) => MethodReturn<MethodName>;
) => Promisify<MethodReturn<MethodName>>;
type TokenTypes = "accessToken" | "refreshToken";