UNPKG

@featurevisor/sdk

Version:

Featurevisor SDK for Node.js and the browser

17 lines (16 loc) 1.05 kB
import { Allocation, Context, Traffic, Feature, Force } from "@featurevisor/types"; import { DatafileReader } from "./datafileReader"; import { Logger } from "./logger"; export declare function getMatchedAllocation(traffic: Traffic, bucketValue: number): Allocation | undefined; export declare function parseFromStringifiedSegments(value: any): any; export declare function getMatchedTraffic(traffic: Traffic[], context: Context, datafileReader: DatafileReader, logger: Logger): Traffic | undefined; export interface MatchedTrafficAndAllocation { matchedTraffic: Traffic | undefined; matchedAllocation: Allocation | undefined; } export declare function getMatchedTrafficAndAllocation(traffic: Traffic[], context: Context, bucketValue: number, datafileReader: DatafileReader, logger: Logger): MatchedTrafficAndAllocation; export interface ForceResult { force?: Force; forceIndex?: number; } export declare function findForceFromFeature(feature: Feature, context: Context, datafileReader: DatafileReader, logger: Logger): ForceResult;