correct type import

This commit is contained in:
Ulf Gebhardt 2025-05-16 11:22:13 +02:00
parent 3f4c50d34e
commit 5e3aca1959
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
5 changed files with 12 additions and 11 deletions

View File

@ -21,8 +21,8 @@ import { TabsForm } from './Templates/TabsForm'
import type { FormState } from '#types/FormState'
import type { Item } from '#types/Item'
import type { MarkerIcon } from '#types/MarkerIcon'
import type { Tag } from '#types/Tag'
import type { markerIcon } from '#utils/MarkerIconFactory'
/**
* @category Profile
@ -40,7 +40,7 @@ export function ProfileForm() {
telephone: '',
next_appointment: '',
image: '',
marker_icon: {} as markerIcon,
marker_icon: {} as MarkerIcon,
offers: [] as Tag[],
needs: [] as Tag[],
relations: [] as Item[],

View File

@ -2,10 +2,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
import { divIcon, Point } from 'leaflet'
export interface markerIcon {
image: string
size?: number
}
import type { MarkerIcon } from '#types/MarkerIcon'
const createSvg = (shape: string, markerColor: string, borderColor: string) => {
const svgMap = {
@ -38,7 +35,7 @@ const MarkerIconFactory = (
shape: string,
color1: string,
color2: string,
icon?: markerIcon,
icon?: MarkerIcon,
assetsURL?: string,
) => {
if (icon && assetsURL)

4
src/types/Item.d.ts vendored
View File

@ -1,6 +1,6 @@
import type { markerIcon } from '#utils/MarkerIconFactory'
import type { ItemsApi } from './ItemsApi'
import type { LayerProps } from './LayerProps'
import type { MarkerIcon } from './MarkerIcon'
import type { Relation } from './Relation'
import type { UserItem } from './UserItem'
import type { Point } from 'geojson'
@ -44,7 +44,7 @@ export interface Item {
needs?: TagIds
status?: string
color?: string
markerIcon?: markerIcon
markerIcon?: MarkerIcon
avatar?: string
new?: boolean
contact?: string

View File

@ -1,8 +1,8 @@
import type { markerIcon } from '#utils/MarkerIconFactory'
import type { Item } from './Item'
import type { ItemFormPopupProps } from './ItemFormPopupProps'
import type { ItemsApi } from './ItemsApi'
import type { ItemType } from './ItemType'
import type { MarkerIcon } from './MarkerIcon'
/**
* @category Types
@ -15,7 +15,7 @@ export interface LayerProps {
menuIcon: string
menuColor: string
menuText: string
markerIcon: markerIcon
markerIcon: MarkerIcon
markerShape: string
markerDefaultColor: string
markerDefaultColor2?: string

4
src/types/MarkerIcon.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export interface MarkerIcon {
image: string
size?: number
}