TomTom Maps for JavaScript
    Preparing search index...

    Variable createEventRuleConst

    createEventRule: (
        state: ToolState,
        parameters: CreateEventRuleParams,
        executeOptions?: ToolExecuteOptions,
    ) => Promise<CreateEventRuleResult>

    Creates an event rule from app code, as the createEventRule tool does for the model.

    Type Declaration

    Call it from a compact custom tool for a watch your app defines, so the model writes no code. It dry-runs code, registers the event rule and re-runs its code whenever a watched dataset changes. A condition that already holds fires one opened alert. Set resolveAfterMs so a condition that flickers false between recomputes doesn't resolve and reopen. To remove the event rule, call state.eventRules.unregister(ruleId).