Skip to content

Commit

Permalink
Merge pull request #46 from stevage/ts
Browse files Browse the repository at this point in the history
Ts
  • Loading branch information
stevage authored Jan 21, 2025
2 parents e71f13d + dca6be7 commit d19a6eb
Show file tree
Hide file tree
Showing 23 changed files with 30,838 additions and 4,509 deletions.
11 changes: 0 additions & 11 deletions .flowconfig

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### 0.50.0
- convert from Flow to TypeScript.
- probably mess up the packaging once more.

### 0.44.0
- add match/interpolate/zoom convenience functions, somewhat experimental

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ const map = new mapgl.Map({ ... });
import U from 'map-gl-utils';
U.init(map);
// if you need to explicitly import the ESM version:
import U from 'map-gl-utils/dist/index.esm.js'
U.init(map);
// A small number of methods (eg hoverPopup) require access to the maplibre-gl/mapbox-gl library itself, in order to instantiate other objects.
require('map-gl-utils').init(map, mapgl);
```
Expand All @@ -48,12 +55,7 @@ The default distribution is an ES2015 module with no transpiling. If you experie
require('map-gl-utils/umd').init(map);
```

If you want to use Flow types:

```
import type MapGlUtils from 'map-gl-utils/src/index'
```

Typescript types are included in `dist/types/index.d.ts`.

### Guide

Expand Down Expand Up @@ -328,6 +330,6 @@ Documentation built with [documentation.js](https://github.com/documentationjs/d

Packaging uses [rollup.js](https://rollupjs.org/guide/en/) and [Babel](https://babeljs.io/).

[Flow](https://flow.org/) is used internally, including types from [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js).
Typescript is used internally, including types from [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js).

Tests are run using [Jest](https://jestjs.io/).
Loading

0 comments on commit d19a6eb

Please sign in to comment.