Skip to content

Commit 4f5a2eb

Browse files
chore: minor housekeeping 🍿
Signed-off-by: Vinayak Kulkarni <[email protected]>
1 parent 5d7a8dd commit 4f5a2eb

File tree

21 files changed

+499
-632
lines changed

21 files changed

+499
-632
lines changed

lib/v-mapbox/constants/events/layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MapLayerEventType } from 'maplibre-gl';
1+
import type { MapLayerEventType } from 'maplibre-gl';
22

33
export const mapLayerEvents: Array<keyof MapLayerEventType> = [
44
'click',

lib/v-mapbox/constants/events/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MapEventType } from 'maplibre-gl';
1+
import type { MapEventType } from 'maplibre-gl';
22

33
export const mapEvents: Array<keyof MapEventType> = [
44
'error',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const popupEvents = ['open', 'close'];
1+
export const popupEvents = ['open', 'close'] as Array<'open' | 'close'>;

lib/v-mapbox/controls/attribution/VControlAttribution.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<script setup lang="ts">
2-
import type { AttributionOptions, ControlPosition } from './types';
32
import { AttributionControl } from 'maplibre-gl';
43
import { onMounted } from 'vue';
54
import { MapKey, injectStrict } from '../../utils';
5+
import type { AttributionControlOptions, ControlPosition } from './types';
66
7-
const defaultOptions: AttributionOptions = {
7+
const defaultOptions: AttributionControlOptions = {
88
compact: false,
99
customAttribution: undefined,
1010
};
1111
1212
const props = withDefaults(
1313
defineProps<{
14-
options?: AttributionOptions;
14+
options?: AttributionControlOptions;
1515
position?: ControlPosition;
1616
}>(),
1717
{
@@ -22,7 +22,7 @@
2222
2323
const slots = useSlots();
2424
25-
let map = injectStrict(MapKey);
25+
const map = injectStrict(MapKey);
2626
2727
onMounted(() => {
2828
addControl();
@@ -36,7 +36,7 @@
3636
};
3737
}
3838
if (slots && slots.default?.()) {
39-
options.customAttribution = slots.default()[0]
39+
options.customAttribution = slots.default()[0]!
4040
.children as unknown as string;
4141
}
4242
const control = new AttributionControl(options);
@@ -45,5 +45,5 @@
4545
</script>
4646

4747
<template>
48-
<slot />
48+
<slot></slot>
4949
</template>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type { AttributionOptions, ControlPosition } from 'maplibre-gl';
1+
export type { AttributionControlOptions, ControlPosition } from 'maplibre-gl';

lib/v-mapbox/controls/fullscreen/VControlFullscreen.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<script setup lang="ts">
2-
import type { ControlPosition, FullscreenOptions } from './types';
32
import { FullscreenControl } from 'maplibre-gl';
43
import { onMounted } from 'vue';
54
import { MapKey, injectStrict } from '../../utils';
5+
import type { ControlPosition, FullscreenControlOptions } from './types';
66
7-
const defaultOptions: FullscreenOptions = {
7+
const defaultOptions: FullscreenControlOptions = {
88
container: undefined,
99
};
1010
1111
const props = withDefaults(
1212
defineProps<{
13-
options?: FullscreenOptions;
13+
options?: FullscreenControlOptions;
1414
position?: ControlPosition;
1515
}>(),
1616
{
@@ -19,7 +19,7 @@
1919
},
2020
);
2121
22-
let map = injectStrict(MapKey);
22+
const map = injectStrict(MapKey);
2323
2424
onMounted(() => {
2525
addControl();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type { ControlPosition, FullscreenOptions } from 'maplibre-gl';
1+
export type { FullscreenControlOptions, ControlPosition } from 'maplibre-gl';

lib/v-mapbox/controls/geolocate/VControlGeolocate.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup lang="ts">
2-
import type { ControlPosition, GeolocateOptions } from './types';
32
import { GeolocateControl } from 'maplibre-gl';
43
import { onMounted } from 'vue';
5-
import { geolocateControlEvents as events } from './events';
64
import { MapKey, injectStrict } from '../../utils';
5+
import { geolocateControlEvents as events } from './events';
6+
import type { ControlPosition, GeolocateControlOptions } from './types';
77
8-
const defaultOptions: GeolocateOptions = {
8+
const defaultOptions: GeolocateControlOptions = {
99
fitBoundsOptions: {
1010
linear: false,
1111
offset: [0, 0],
@@ -23,7 +23,7 @@
2323
2424
const props = withDefaults(
2525
defineProps<{
26-
options?: GeolocateOptions;
26+
options?: GeolocateControlOptions;
2727
position?: ControlPosition;
2828
}>(),
2929
{
@@ -34,7 +34,7 @@
3434
3535
const emit = defineEmits(events);
3636
37-
let map = injectStrict(MapKey);
37+
const map = injectStrict(MapKey);
3838
3939
onMounted(() => {
4040
addControl();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type { ControlPosition, GeolocateOptions } from 'maplibre-gl';
1+
export type { GeolocateControlOptions, ControlPosition } from 'maplibre-gl';

lib/v-mapbox/controls/navigation/VControlNavigation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup lang="ts">
2-
import type { ControlPosition, NavigationOptions } from './types';
32
import { NavigationControl } from 'maplibre-gl';
43
import { onMounted, inject } from 'vue';
54
import { MapKey } from '../../utils';
5+
import type { ControlPosition, NavigationOptions } from './types';
66
77
const defaultOptions: NavigationOptions = {
88
showCompass: true,

0 commit comments

Comments
 (0)