@devcycle/js-client-sdk
Version:
The Javascript Client SDK for DevCycle
19 lines (18 loc) • 684 B
TypeScript
import { DVCVariable as Variable, DVCVariableValue } from './types';
import { VariableTypeAlias } from '@devcycle/types';
export interface DVCVariableOptions<T> {
key: string;
defaultValue: T;
value?: VariableTypeAlias<T>;
evalReason?: any;
}
export declare class DVCVariable<T extends DVCVariableValue> implements Variable<T> {
key: string;
value: VariableTypeAlias<T>;
callback?: (value: VariableTypeAlias<T>) => void;
readonly defaultValue: T;
isDefaulted: boolean;
readonly evalReason: any;
constructor(variable: DVCVariableOptions<T>);
onUpdate(callback: (value: VariableTypeAlias<T>) => void): DVCVariable<T>;
}