Skip to content

Commit ca604b7

Browse files
committed
feat(JawgPlaces): use this as return type
1 parent 5116f1f commit ca604b7

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jawg/types",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Shared TypeScript definitions for Jawg Maps projects",
55
"types": "./index.d.ts",
66
"type": "module",
@@ -37,14 +37,14 @@
3737
"rollup": "^4.9.4",
3838
"rollup-plugin-dts": "^6.1.0",
3939
"rollup-plugin-serve": "^1.1.1",
40-
"typedoc": "^0.26.11",
41-
"typedoc-plugin-ga": "1.0.4",
42-
"typescript": "^5.6.3"
40+
"typedoc": "^0.27.6",
41+
"typedoc-plugin-ga": "^1.0.5",
42+
"typescript": "^5.7.2"
4343
},
4444
"dependencies": {
4545
"@types/geojson": "^7946.0.7",
4646
"@types/leaflet": "^1.7.3",
4747
"@types/mapbox-gl": "^1.13.2",
48-
"maplibre-gl": "^4.7.1"
48+
"maplibre-gl": "^5.0.0"
4949
}
5050
}

src/places-js.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ declare namespace JawgPlaces {
724724
* @param map The map from [MapLibre](https://maplibre.org/maplibre-gl-js-docs/api/map/) or [Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/map/)
725725
* @returns itself
726726
*/
727-
attachMap(map: maplibregl.Map | mapboxgl.Map): MapLibre;
727+
attachMap(map: maplibregl.Map | mapboxgl.Map): this;
728728
/**
729729
* The default position of the control in the map.
730730
*/
@@ -744,8 +744,6 @@ declare namespace JawgPlaces {
744744
class Mapbox extends MapLibre {
745745
/** {@inheritDoc Mapbox} */
746746
constructor(options?: JawgPlacesMaplibreOptions);
747-
/** @inheritDoc */
748-
attachMap(map: maplibregl.Map | mapboxgl.Map): Mapbox;
749747
}
750748

751749
/**
@@ -770,13 +768,13 @@ declare namespace JawgPlaces {
770768
* Adds the control to the given map. You can alternatively use `map.addControl(jawgPlaces)`.
771769
* @param map from [Leaflet](https://leafletjs.com/reference.html#map-example)
772770
*/
773-
addTo(map: L.Map): Leaflet;
771+
addTo(map: L.Map): this;
774772
/**
775773
* When Jawg Places **is not used** as a control within your map, you will need to call this function.
776774
* @param map from [Leaflet](https://leafletjs.com/reference.html#map-example)
777775
* @returns itself
778776
*/
779-
attachMap(map: L.Map): Leaflet;
777+
attachMap(map: L.Map): this;
780778
}
781779

782780
/**

0 commit comments

Comments
 (0)