UNPKG

vue-yandex-maps

Version:
54 lines (53 loc) 2.22 kB
import { YMapEntity } from '@yandex/ymaps3-types'; import { Projection } from '@yandex/ymaps3-types/common/types'; import { ComputedRef, Ref } from 'vue'; export declare function setupMapChildren<T extends YMapEntity<unknown> | Projection, R extends (() => Promise<unknown>)>({ returnOnly, willDeleteByHand, strictMapRoot, requiredImport, createFunction, settings, settingsUpdateIgnoreKeys, isLayer, isMercator, isMapRoot, mapRootRef, duplicateInit, }: { /** * @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 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; }): Promise<T>;