mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-11 04:01:15 -04:00
feat: require JSDoc in new api (#50429)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
export type ProgressTimestamp = number | { timestamp: number } | null;
|
||||
|
||||
/**
|
||||
* Converts a ProgressTimestamp array to a object with keys based on the timestamps.
|
||||
*
|
||||
* @param progressTimestamps The ProgressTimestamp array.
|
||||
* @returns The object with keys based on the timestamps.
|
||||
*/
|
||||
export const getCalendar = (
|
||||
progressTimestamps: ProgressTimestamp[] | null
|
||||
): Record<string, 1> => {
|
||||
@@ -17,6 +23,12 @@ export const getCalendar = (
|
||||
return calendar;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a ProgressTimestamp array to an integer number of points.
|
||||
*
|
||||
* @param progressTimestamps The ProgressTimestamp array.
|
||||
* @returns The number of points.
|
||||
*/
|
||||
export const getPoints = (
|
||||
progressTimestamps: ProgressTimestamp[] | null
|
||||
): number => {
|
||||
|
||||
Reference in New Issue
Block a user