File

libs/ngx-pfe/pfe-conditions/conditions.service.ts

Index

Properties
Methods

Properties

Public Abstract conditionExecuted$
Type : Observable<>

Observable that will emit when a condition is executed.

Methods

Public Abstract evaluateCondition
evaluateCondition(condition, state?)

Evaluates a single condition

Parameters :
Name Optional Description
condition No

The condition configuration

state Yes

The state provided to the conditions.

Returns : boolean
Public Abstract evaluateConditions
evaluateConditions(conditions, state?)

Evaluates an array of conditions

Parameters :
Name Optional Description
conditions No

The conditions configuration

state Yes

The state provided to the conditions.

Returns : boolean
import { Observable } from 'rxjs';

export abstract class PfeConditionsService {
  /**
   * Observable that will emit when a condition is executed.
   */
  public abstract conditionExecuted$: Observable<unknown>;

  /**
   * Evaluates an array of conditions
   * @param conditions The conditions configuration
   * @param state The state provided to the conditions.
   */
  public abstract evaluateConditions(conditions: unknown, state?: unknown): boolean;

  /**
   * Evaluates a single condition
   * @param condition The condition configuration
   * @param state The state provided to the conditions.
   */
  public abstract evaluateCondition(condition: unknown, state?: unknown): boolean;
}

results matching ""

    No results matching ""