From 7caf088a7ed6016709fce924577aa09b1302c997 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Tue, 13 Jun 2023 11:03:02 +0200 Subject: [PATCH] Cosmetics (typescript) --- src/lib/osm/tagsStatus.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/lib/osm/tagsStatus.ts b/src/lib/osm/tagsStatus.ts index 56b0aff..f3008cb 100644 --- a/src/lib/osm/tagsStatus.ts +++ b/src/lib/osm/tagsStatus.ts @@ -32,7 +32,7 @@ export const getTagStatus = ( ) => { const defaultStatus = { highlighted: false, - }; + } as TagStatus; const activityDefinitions = definitions[selectedKey]; if (!activityDefinitions) { return defaultStatus; @@ -47,23 +47,16 @@ export const getTagStatus = ( if (!!highlightedDefinitions) { const definition = highlightedDefinitions[tag]; if (!!definition) { - return { type, definition, highlighted: true }; + return { type, definition, highlighted: true } as TagStatus; } } for (const category of Object.keys(typeDefinitions)) { if (category !== highlightedKey) { const categoryDefinitions = typeDefinitions[category]; - console.log({ - caller: 'getTagStatus / looping over categories', - type, - typeDefinitions, - category, - categoryDefinitions, - }); const definition = categoryDefinitions[tag]; if (!!definition) { - return { type, definition, highlighted: false }; + return { type, definition, highlighted: false } as TagStatus; } } }