UNPKG

vue-yandex-maps

Version:
62 lines (61 loc) 2.52 kB
import { YMapEntity } from '@yandex/ymaps3-types'; import { Projection } from '@yandex/ymaps3-types/common/types'; import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue'; export declare function setupMapChildren<T extends YMapEntity<unknown> | Projection, R extends (() => Promise<unknown>)>({ returnOnly, willDeleteByHand, strictMapRoot, requiredImport, createFunction, settings, settingsUpdateIgnoreKeys, settingsUpdateFull, isLayer, isMercator, isMapRoot, mapRootRef, duplicateInit, index, }: { /** * @description Prevents duplicate provide injections */ duplicateInit?: boolean; /** * @description Disables onBeforeUnmount hook */ willDeleteByHand?: boolean; /** * @description Disables children-to-root injection */ returnOnly?: boolean; /** * @description Requires map root to be present (map root can't be YMap in this case) */ strictMapRoot?: boolean; /** * @description Sets injected component to be root of children components (array.push/.addChild will be called) */ isMapRoot?: boolean; /** * @description Allows to use array instead of addChild mapRoot injection */ mapRootRef?: Ref<YMapEntity<any>[]>; /** * @description Promise to call before calling createFunction. Executes only after Yandex script has been injected */ requiredImport?: R; /** * @description Function that returns Yandex entity */ createFunction: (neededImport: Awaited<ReturnType<R>>) => T; /** * @description Entity reactive settings. If passed, will be auto-watched */ settings?: ComputedRef<Record<string, any>>; /** * @description Allows to not-update specific keys inside of settings watch */ settingsUpdateIgnoreKeys?: string[] | ComputedRef<string[]>; /** * @description skips diff check */ settingsUpdateFull?: boolean; /** * @description Specifies that entity is a layer children. Will be injected to layer ref instead of root and will skip YandexMap initialization */ isLayer?: boolean; /** * @description Specifies that entity is a layer children. Will be injected to layer ref instead of root and will skip YandexMap initialization, and will be added in special way to YandexMap */ isMercator?: boolean; /** * @description Index of the child for map collection. If not passed, will be added to the end */ index?: MaybeRefOrGetter<number | undefined>; }): Promise<T>;