@telcomdataperu/zeus-vue-model-manager
Version:
Vue 3 Model Manager for Microfrontends with OpenUI5-style API - Part of ZEUS Platform by TelcomdataPeru
11 lines (10 loc) • 604 B
TypeScript
import { WritableComputedRef } from 'vue';
import { ModelPath } from '../types';
export interface UseModelOptions {
scope?: string;
fallbackSearch?: boolean;
defaultValue?: any;
}
export declare function useModel<T = any>(modelName: string, path: ModelPath, options?: UseModelOptions): WritableComputedRef<T | undefined>;
export declare function useModelFromScope<T = any>(scope: string, modelName: string, path: ModelPath): WritableComputedRef<T | undefined>;
export declare function useModelWithDefault<T = any>(modelName: string, path: ModelPath, defaultValue: T): WritableComputedRef<T>;