refactor(maplibre): improuve type imports
This commit is contained in:
parent
0b1fdf88c8
commit
31da6178cc
3 changed files with 5 additions and 8 deletions
|
@ -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';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { AnyLayer } from 'maplibre-gl';
|
import type { AnyLayer } from 'maplibre-gl';
|
||||||
|
|
||||||
const layers: AnyLayer[] = [
|
const layers: AnyLayer[] = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue