watergis / maplibre-gl-legend

This module adds legend control which is able to create legend panel from mapbox style to maplibre-gl-legend
https://maplibre-gl-legend.water-gis.com/
MIT License
31 stars 7 forks source link

Typescript error on import #23

Closed brandonfcohen1 closed 4 months ago

brandonfcohen1 commented 4 months ago

Describe the bug Type definitions not being resolved when importing module:

Could not find a declaration file for module '@watergis/maplibre-gl-legend'. '/Users/brandoncohen/Documents/dev/vacant-lots-proj/node_modules/@watergis/maplibre-gl-legend/dist/maplibre-gl-legend.es.js' implicitly has an 'any' type.
  There are types at '/Users/brandoncohen/Documents/dev/vacant-lots-proj/node_modules/@watergis/maplibre-gl-legend/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@watergis/maplibre-gl-legend' library may need to update its package.json or typings.ts(7016)

To Reproduce Steps to reproduce the behavior:

  1. Import package using import { MaplibreLegendControl } from "@watergis/maplibre-gl-legend";
  2. See TS error in Code Editor

Expected behavior Types should be properly exported from package

Screenshots image

Desktop (please complete the following information):