From fe7ee2af34c05629e1d199c09de226a31cafdf2f Mon Sep 17 00:00:00 2001 From: Yohan Gabriel Toledo Bernart <81057026+YohanToledo@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:01:32 -0300 Subject: [PATCH] fix: remove unused typings in jsdocs (#63) --- src/authTokenInterceptor.ts | 6 +++--- src/tokensUtils.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/authTokenInterceptor.ts b/src/authTokenInterceptor.ts index f29f809..64f7878 100644 --- a/src/authTokenInterceptor.ts +++ b/src/authTokenInterceptor.ts @@ -20,8 +20,8 @@ let currentlyRequestingPromise: Promise | undefined = undefin /** * Gets the unix timestamp from an access token * - * @param {string} token - Access token - * @returns {string} Unix timestamp + * @param {Token} token - Access token + * @returns Unix timestamp */ const getTimestampFromToken = (token: Token): number | undefined => { const decoded = jwtDecode(token) @@ -106,7 +106,7 @@ const refreshToken = async (requestRefresh: TokenRefreshRequest): Promise /** * Gets the current access token, exchanges it with a new one if it's expired and then returns the token. - * @param {requestRefresh} requestRefresh - Function that is used to get a new access token + * @param {TokenRefreshRequest} requestRefresh - Function that is used to get a new access token * @returns {string} Access token */ export const refreshTokenIfNeeded = async ( diff --git a/src/tokensUtils.ts b/src/tokensUtils.ts index be069a8..493fbbc 100644 --- a/src/tokensUtils.ts +++ b/src/tokensUtils.ts @@ -8,7 +8,7 @@ import { IAuthTokens } from './IAuthTokens' /** * Returns the refresh and access tokens - * @returns {IAuthTokens} Object containing refresh and access tokens + * @returns Object containing refresh and access tokens */ const getAuthTokens = async (): Promise => { const rawTokens = await StorageProxy.Storage?.get(STORAGE_KEY) @@ -27,12 +27,12 @@ const getAuthTokens = async (): Promise => { /** * Sets the access token - * @param {string} token - Access token + * @param {Token} token - Access token */ export const setAccessToken = async (token: Token): Promise => { const tokens = await getAuthTokens() if (!tokens) { - throw new Error('Unable to update access token since there are not tokens currently stored') + throw new Error('Unable to update access token since there are no tokens currently stored') } tokens.accessToken = token @@ -41,7 +41,7 @@ export const setAccessToken = async (token: Token): Promise => { /** * Returns the stored refresh token - * @returns {string} Refresh token + * @returns Refresh token */ export const getRefreshToken = async (): Promise => { const tokens = await getAuthTokens() @@ -50,7 +50,7 @@ export const getRefreshToken = async (): Promise => { /** * Returns the stored access token - * @returns {string} Access token + * @returns Access token */ export const getAccessToken = async (): Promise => { const tokens = await getAuthTokens()