UNPKG

visitor-segments

Version:
22 lines 751 B
import { StorageAdapterClass, ValueStorageInterface } from './lib/interfaces'; declare type VisitorData = { [key: string]: string | number; }; export declare class Visitor implements ValueStorageInterface { #private; protected data: VisitorData; private readonly storage; private readonly key; constructor(key: string, adapter: StorageAdapterClass, expiresInDays?: number); onUpdate(handler: (key: string, value: string) => void): void; getValue(key: string): any; setValue(key: string, value: any): void; setValueOnce(key: string, value: any): void; removeValue(key: string): void; now(): number; clear(): void; private save; private load; } export {}; //# sourceMappingURL=visitor.d.ts.map