UNPKG

flagmint-vuejs-feature-flags

Version:

A Vue.js SDK for managing feature flags in Flagmint applications, supporting both Vue 2 and Vue 3.

34 lines (31 loc) 1.23 kB
import { FlagClient } from 'flagmint-js-sdk'; type FlagsMixinThis = { $nextTick(arg0: () => void): unknown; $watch(arg0: string, arg1: (val: any) => void): () => void; $flagmintInit: () => Promise<FlagClient<any>>; $flagmint: FlagClient<any> | null; $flagmintReady: boolean; flagClient: FlagClient<any> | null; isFlagReady: boolean; flags: Record<string, unknown>; getFlag: (key: string, fallback?: any) => any; _flagmintUnsubscribe: (() => void) | null; _startFlagSubscription: () => void; updateFlagmintContext: (context: Record<string, any>) => Promise<void>; }; declare const useFlagsMixin: { data: () => { isFlagReady: boolean; flagClient: FlagClient<any> | null; flags: Record<string, unknown>; _flagmintUnsubscribe: (() => void) | null; }; created(this: FlagsMixinThis): void; beforeDestroy(this: FlagsMixinThis): void; methods: { getFlag(this: FlagsMixinThis, key: string, fallback?: any): any; _startFlagSubscription(this: FlagsMixinThis): void; updateFlagmintContext(this: FlagsMixinThis, context: Record<string, any>): Promise<void>; }; } & ThisType<FlagsMixinThis>; export { useFlagsMixin };