mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
chore: utils/index.js is updated to .ts (#46556)
* test: utils index is updated to ts * chore: utils.js is added into the .gitignore and .prettierignore
This commit is contained in:
@@ -21,11 +21,11 @@ const idToTitle = new Map(
|
||||
})
|
||||
);
|
||||
|
||||
const idToPath = new Map();
|
||||
const idToPath = new Map<string, string>();
|
||||
|
||||
// Keep the timeline slugs the same so
|
||||
// we don't break existing links
|
||||
const specialPaths = {
|
||||
const specialPaths: Record<string, string> = {
|
||||
'Legacy Full Stack': 'Full Stack',
|
||||
'Legacy Information Security and Quality Assurance':
|
||||
'Information Security and Quality Assurance',
|
||||
@@ -45,5 +45,5 @@ for (const [id, title] of idToTitle) {
|
||||
}
|
||||
|
||||
export const getCertIds = () => idToPath.keys();
|
||||
export const getPathFromID = id => idToPath.get(id);
|
||||
export const getTitleFromId = id => idToTitle.get(id);
|
||||
export const getPathFromID = (id: string) => idToPath.get(id);
|
||||
export const getTitleFromId = (id: string) => idToTitle.get(id);
|
||||
Reference in New Issue
Block a user