UNPKG

@kameleoon/javascript-sdk-core

Version:
16 lines (15 loc) 624 B
import { Result } from 'ts-res'; import { KameleoonError } from '../../kameleoonError'; import { EvaluationDataType } from '../../targeting/types'; import { ConditionDataType, ICondition } from './types'; export declare class Cookie implements ICondition { private cookie; private keyMatchType?; private valueMatchType?; constructor({ name, value, nameMatchType, valueMatchType, }: ConditionDataType); evaluate({ targetingData, }: EvaluationDataType): Result<boolean, KameleoonError>; private extractCookie; private checkCondition; private compareCookieValue; private isOptionalCookie; }