UNPKG

@empathyco/x-components

Version:
23 lines 963 B
import type { Dictionary } from '@empathyco/x-utils'; import type { ComputedRef } from 'vue'; import type { ExtractGetters, XModuleName } from '../x-modules/x-modules.types'; interface UseGetter { /** @deprecated Use the single-argument overload instead. */ <Module extends XModuleName, Getters = keyof ExtractGetters<Module> & string[]>(module: Module, getters: Getters): Dictionary<ComputedRef>; /** * Preferred. Use this signature for better type inference and future compatibility. */ <Module extends XModuleName, Getters = ExtractGetters<Module>>(module: Module): { [P in keyof Getters]: ComputedRef<Getters[P]>; }; } /** * Function which returns the requested getter's properties as a dictionary. * * @param module - The {@link XModuleName} of the getter. * @returns The requested getters from the module. * @public */ export declare const useGetter: UseGetter; export {}; //# sourceMappingURL=use-getter.d.ts.map