From 587691386c8a49ed94b627798d28dc7cc1750299 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 15 May 2024 18:51:41 -0400 Subject: [PATCH] Add missing types --- shieldlib/src/shield.ts | 2 +- shieldlib/src/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/shieldlib/src/shield.ts b/shieldlib/src/shield.ts index a60cc7282..a7a01ec98 100644 --- a/shieldlib/src/shield.ts +++ b/shieldlib/src/shield.ts @@ -175,7 +175,7 @@ function getShieldDef(shields: ShieldDefinitions, routeDef: RouteDefinition): Sh return null; } - var shieldDef = shields[routeDef.network]; + let shieldDef: ShieldDefinition = shields[routeDef.network]; if (routeDef == null) { return null; diff --git a/shieldlib/src/types.ts b/shieldlib/src/types.ts index ce85408ee..ace751298 100644 --- a/shieldlib/src/types.ts +++ b/shieldlib/src/types.ts @@ -45,6 +45,12 @@ export interface ShieldDefinitionBase { colorLighten: string; /** Perform a color darken operation with this color */ colorDarken: string; + /** Provide a different shield style for specific name values */ + overrideByName: Map + /** Provide a different shield style for specific ref values */ + overrideByRef: Map + /** Provide a different shield style when there's no ref value */ + noref: ShieldDefinition } /**