Loading src/components/LMap.vue +15 −5 Original line number Diff line number Diff line <script> <script lang="ts"> import type L from "leaflet"; import { computed, defineComponent, h, markRaw, nextTick, Loading Loading @@ -137,14 +139,20 @@ const mapProps = { }, }; export default { interface MapBlueprint { ready: boolean; leafletRef?: L.Map; layersToAdd: any[]; // TODO: Proper typing layersInControl: any[]; // TODO: Proper typing } export default defineComponent({ emits: ["ready", "update:zoom", "update:center", "update:bounds"], props: mapProps, setup(props, context) { const root = ref(null); const blueprint = reactive({ const blueprint = reactive<MapBlueprint>({ ready: false, leafletRef: {}, leafletRef: undefined, layersToAdd: [], layersInControl: [], }); Loading @@ -161,6 +169,8 @@ export default { const eventHandlers = { moveEndHandler: debounce(() => { if (!blueprint.leafletRef) return; /** * Triggers when zoom is updated * @type {number,string} Loading Loading @@ -382,5 +392,5 @@ export default { this.ready && this.$slots.default ? this.$slots.default() : {} ); }, }; }); </script> tsconfig.json +2 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ "paths": { "@/*": ["./src/*"] }, "outDir": "./dist" "outDir": "./dist", "noImplicitAny": false }, "references": [ Loading Loading
src/components/LMap.vue +15 −5 Original line number Diff line number Diff line <script> <script lang="ts"> import type L from "leaflet"; import { computed, defineComponent, h, markRaw, nextTick, Loading Loading @@ -137,14 +139,20 @@ const mapProps = { }, }; export default { interface MapBlueprint { ready: boolean; leafletRef?: L.Map; layersToAdd: any[]; // TODO: Proper typing layersInControl: any[]; // TODO: Proper typing } export default defineComponent({ emits: ["ready", "update:zoom", "update:center", "update:bounds"], props: mapProps, setup(props, context) { const root = ref(null); const blueprint = reactive({ const blueprint = reactive<MapBlueprint>({ ready: false, leafletRef: {}, leafletRef: undefined, layersToAdd: [], layersInControl: [], }); Loading @@ -161,6 +169,8 @@ export default { const eventHandlers = { moveEndHandler: debounce(() => { if (!blueprint.leafletRef) return; /** * Triggers when zoom is updated * @type {number,string} Loading Loading @@ -382,5 +392,5 @@ export default { this.ready && this.$slots.default ? this.$slots.default() : {} ); }, }; }); </script>
tsconfig.json +2 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ "paths": { "@/*": ["./src/*"] }, "outDir": "./dist" "outDir": "./dist", "noImplicitAny": false }, "references": [ Loading