fix(basemap): type provider style union

This commit is contained in:
Shadowbroker committed 2026-10-06 15:50:21 -06:00
1 parent bb369099b7
commit b6d3c20690
1 file changed
+3 -1
@@ -1,3 +1,5 @@
import type { StyleSpecification } from 'maplibre-gl';
/**
* ShadowBroker's zero-config basemap uses OpenFreeMap vector styles.
* Operators who configure CARTO_API_KEY keep the existing CARTO raster
@@ -39,7 +41,7 @@ export function cartoTileUrls(theme: BasemapTheme, cartoApiKey: string): string[
* Use OpenFreeMap by default. CARTO is retained as an opt-in compatibility
* path when an operator has already configured CARTO_API_KEY.
*/
export function buildBasemapStyle(theme: BasemapTheme, cartoApiKey?: string | null) {
export function buildBasemapStyle(\n theme: BasemapTheme,\n cartoApiKey?: string | null,\n): string | StyleSpecification {
const key = (cartoApiKey || '').trim();
if (!key) return OPENFREEMAP_STYLE_URLS[theme];