MCPcopy Create free account
hub / github.com/TUM-Dev/NavigaTUM / entityPath

Function entityPath

webclient/app/utils/entityPath.ts:43–61  ·  view source on GitHub ↗
(id: string, type: EntityType)

Source from the content-addressed store, hash-verified

41 * {@link isEntityType} first.
42 */
43export function entityPath(id: string, type: EntityType): EntityPath {
44 switch (type) {
45 case "campus":
46 return `/campus/${id}`;
47 case "site":
48 case "area":
49 return `/site/${id}`;
50 case "building":
51 case "joined_building":
52 return `/building/${id}`;
53 case "room":
54 case "virtual_room":
55 return `/room/${id}`;
56 case "poi":
57 return `/poi/${id}`;
58 default:
59 return type satisfies never;
60 }
61}

Callers 1

lectureEventPathFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected