From 8e587b756d348ccc019dffd760882454e17cab7f Mon Sep 17 00:00:00 2001 From: HarelM Date: Wed, 13 Mar 2024 22:34:32 +0200 Subject: [PATCH] Remove unwanted "as any" --- src/components/MapMaplibreGl.tsx | 2 +- src/libs/highlight.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MapMaplibreGl.tsx b/src/components/MapMaplibreGl.tsx index cf55ca0a..2b4d6085 100644 --- a/src/components/MapMaplibreGl.tsx +++ b/src/components/MapMaplibreGl.tsx @@ -176,7 +176,7 @@ export default class MapMaplibreGl extends React.Component { - return Color(colors.brightColor(layerId, alpha as any)).desaturate(0.5).string() + return Color(colors.brightColor(layerId, alpha)).desaturate(0.5).string() }, buildInspectStyle: (originalMapStyle: StyleSpecification, coloredLayers: HighlightedLayer[]) => buildInspectStyle(originalMapStyle, coloredLayers, this.props.highlightedLayer), renderPopup: (features: InspectFeature[]) => { diff --git a/src/libs/highlight.ts b/src/libs/highlight.ts index 1f6c6a34..511e35e6 100644 --- a/src/libs/highlight.ts +++ b/src/libs/highlight.ts @@ -24,7 +24,7 @@ export function colorHighlightedLayer(layer?: LayerSpecification): HighlightedLa if(!layer || layer.type === 'background' || layer.type === 'raster') return null const sourceLayerId = layer['source-layer'] || '' - const color = colors.brightColor(sourceLayerId, 1 as any); + const color = colors.brightColor(sourceLayerId, 1); if(layer.type === "fill" || layer.type === 'fill-extrusion') { return changeLayer(stylegen.polygonLayer(color, color, layer.source, layer['source-layer']), layer)