Class NudgeEvaluator

Hierarchy

  • NudgeEvaluator

Constructors

  • Parameters

    • channel: ChannelLike
    • onNudge: ((nudge) => void)
    • nudges: {
          expr: Expr;
          id: string;
      }[]
    • context: {
          ab: number;
          office_hours: OfficeHours[];
          visitor: {
              inserted_at: string;
              locale: null | string;
              timezone: null | string;
          };
      }
      • ab: number
      • office_hours: OfficeHours[]
      • visitor: {
            inserted_at: string;
            locale: null | string;
            timezone: null | string;
        }
        • inserted_at: string
        • locale: null | string
        • timezone: null | string
    • onStop: null | (() => void) = null

    Returns NudgeEvaluator

Properties

channel: ChannelLike
context: Context
erroredNudges: Set<string> = ...
errors: ErrorTracker = {}
interval: null | Timeout = null
intervalSpeed: number = 1000
nudges: {
    expr: Expr;
    id: string;
}[]

Type declaration

  • expr: Expr
  • id: string
onNudge: ((nudge) => void)

Type declaration

onStop: null | (() => void)

Type declaration

    • (): void
    • Returns void

queuedForRemoval: Set<string> = ...
triggeredNudges: Set<string> = ...

Methods

Generated using TypeDoc