From c72e601215f6ff7cb3ea225273efa662671a7f8c Mon Sep 17 00:00:00 2001 From: Jon Bramley Date: Wed, 3 Apr 2024 21:28:54 +0100 Subject: [PATCH] Fix types for VectorTileLayerProps `styleUrl` can take a complex json object, so for this use case we end up patching the type to allow `any`. Furthermore, we require the `transformRequest` functionality which again we end up patching to avoid type errors. These two changes would allow us to run without patching. --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 68bdadc..645372b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,8 @@ import { import L, { TileLayer as LeafletTileLayer, TileLayerOptions } from 'leaflet'; export interface VectorTileLayerProps extends TileLayerOptions, LayerProps { - styleUrl: string + styleUrl: any; + transformRequest: (url: string) => {url: string}; } const VectorTileLayer = createTileLayerComponent<