refactor(maplibre): improuve type imports

This commit is contained in:
Paul Chavard 2022-03-17 11:54:44 +01:00
parent 0b1fdf88c8
commit 31da6178cc
3 changed files with 5 additions and 8 deletions

View file

@ -8,7 +8,8 @@ import React, {
createContext, createContext,
useCallback useCallback
} from 'react'; } from 'react';
import maplibre, { Map, Style, NavigationControl } from 'maplibre-gl'; import maplibre, { Map, NavigationControl } from 'maplibre-gl';
import type { Style } from 'maplibre-gl';
import invariant from 'tiny-invariant'; import invariant from 'tiny-invariant';

View file

@ -1,4 +1,4 @@
import { AnyLayer } from 'maplibre-gl'; import type { AnyLayer } from 'maplibre-gl';
const layers: AnyLayer[] = [ const layers: AnyLayer[] = [
{ {

View file

@ -1,10 +1,6 @@
import { import type { LngLat, LngLatLike, LngLatBoundsLike } from 'maplibre-gl';
LngLatBounds,
LngLat,
LngLatLike,
LngLatBoundsLike
} from 'maplibre-gl';
import type { Geometry, FeatureCollection, Feature } from 'geojson'; import type { Geometry, FeatureCollection, Feature } from 'geojson';
import { LngLatBounds } from 'maplibre-gl';
import invariant from 'tiny-invariant'; import invariant from 'tiny-invariant';
export function getBounds(geometry: Geometry): LngLatBoundsLike { export function getBounds(geometry: Geometry): LngLatBoundsLike {