Skip to content

Commit

Permalink
Correct JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaHaceCosas committed Aug 8, 2024
1 parent c3a65d6 commit 21e0257
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/toolkit/objectives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ import { adjustedToday, getCurrentDate, TodaysDay } from '@/src/toolkit/today';

// Función para obtener los objetivos
/**
* Returns the objectives from AsyncStorage in the specified format.
* Returns the objectives from AsyncStorage as an `Objective[]`, or `null` / `[]` if there aren't any objectives.
*
* @async
* @param {("object" | "string")} [wayToGetThem="object"] - The format to return the objectives in.
* @returns {Promise<Objective[] | string>} - Returns the objectives in the specified format.
* @returns {Promise<Objective[] | null>} - Returns the objectives in the specified format.
*/
const getObjectives = async (): Promise<Objective[] | null> => {
try {
Expand Down Expand Up @@ -321,7 +320,7 @@ async function checkForTodaysObjectives(objectives: { [key: string]: Objective }
}

/**
* Turns objective arrays where [key: string] is used onto objects to avoid errors.
* Turns objective arrays where `[key: string]` is used onto objects to avoid errors.
*
* @param {Objective[]} objectives The `Objective[]` you want to correct
* @returns {{ [key: string]: Objective }} The corrected object
Expand Down

0 comments on commit 21e0257

Please sign in to comment.