flagmint-vuejs-feature-flags
Version:
A Vue.js SDK for managing feature flags in Flagmint applications, supporting both Vue 2 and Vue 3.
16 lines (13 loc) • 725 B
TypeScript
import { Ref } from 'vue';
import { FlagClient } from 'flagmint-js-sdk';
/**
* useFlagmint composable to access the FlagClient instance, its readiness state, and an initialization function.
* This composable is designed to be used in Vue 3 applications to manage feature flags.
* @returns An object containing the FlagClient instance, a boolean indicating if the client is ready, and an init function to initialize the client.
*/
declare function useFlagmint<T = unknown>(): {
readonly client: Ref<FlagClient<T, Record<string, any>>, FlagClient<T, Record<string, any>>> | null;
readonly isReady: Ref<boolean, boolean> | null;
readonly init: (() => Promise<FlagClient<T>>) | null;
};
export { useFlagmint };