style: prettier bahiaGeometryModuleFactory

This commit is contained in:
Cursor Agent 2026-07-31 01:42:01 +00:00
parent 8188c9a386
commit 479af4f2ef

View file

@ -3,10 +3,7 @@ import { feature } from 'topojson-client'
import type { BahiaFeature } from '@/lib/bahiaGeometriesTypes' import type { BahiaFeature } from '@/lib/bahiaGeometriesTypes'
import type { GeometryCollection, Topology } from 'topojson-specification' import type { GeometryCollection, Topology } from 'topojson-specification'
type GeometryModuleBase< type GeometryModuleBase<Properties extends Record<string, unknown>, TObjectName extends string> = {
Properties extends Record<string, unknown>,
TObjectName extends string,
> = {
topology: Topology<{ [key in TObjectName]: GeometryCollection<Properties> }> topology: Topology<{ [key in TObjectName]: GeometryCollection<Properties> }>
features: readonly BahiaFeature<Properties>[] features: readonly BahiaFeature<Properties>[]
} }
@ -69,9 +66,7 @@ export function buildGeometryModuleFromTopology<
return base return base
} }
const featuresByKey = new Map( const featuresByKey = new Map(features.map((entry) => [entry.properties[keyProperty], entry]))
features.map((entry) => [entry.properties[keyProperty], entry]),
)
return { return {
...base, ...base,