<commit_before>import { EventEmitter } from 'events';

import Event from '../interfaces/Event';
import EventConstructor from '../interfaces/EventConstructor';
import UserInput from '../interfaces/UserInput';
import Variable from '../interfaces/Variable';

class VariableValueChangedEvent extends EventEmitter implements Event {

  public readonly metadata: Event.Metadata;

  private readonly variable: Variable;

  constructor(metadata: Event.Metadata, variable: Variable) {
    super();

    this.variable = variable;
    this.metadata = metadata;

    variable.addChangeEventListener(newValue => {
      this.emit('eventTriggered', newValue);
    });
  }

  public addTriggerEventListener(listener: () => void) {
    super.addListener('eventTriggered', listener);
  }

  public removeTriggerEventListener(listener: () => void) {
    super.removeListener('eventTriggered', listener);
  }

}

/* istanbul ignore next */
namespace VariableValueChangedEvent {
  export class Constructor implements EventConstructor {

    public readonly uniqueId = 'variable_value_changed';

    public readonly name = 'Variable Value Changed';

    public readonly inputs: UserInput[] = [
      {
        uniqueId: 'variable',
        name: 'Variable',
        required: true,
        allowsMultiple: false,
        kind: UserInput.Kind.variable,
      },
    ];
<commit_msg>Removes `/* istanbul ignore next */` from `VariableValueChangedEvent`<commit_after>import { EventEmitter } from 'events';

import Event from '../interfaces/Event';
import EventConstructor from '../interfaces/EventConstructor';
import UserInput from '../interfaces/UserInput';
import Variable from '../interfaces/Variable';

class VariableValueChangedEvent extends EventEmitter implements Event {

  public readonly metadata: Event.Metadata;

  private readonly variable: Variable;

  constructor(metadata: Event.Metadata, variable: Variable) {
    super();

    this.variable = variable;
    this.metadata = metadata;

    variable.addChangeEventListener(newValue => {
      this.emit('eventTriggered', newValue);
    });
  }

  public addTriggerEventListener(listener: () => void) {
    super.addListener('eventTriggered', listener);
  }

  public removeTriggerEventListener(listener: () => void) {
    super.removeListener('eventTriggered', listener);
  }

}

namespace VariableValueChangedEvent {
  export class Constructor implements EventConstructor {

    public readonly uniqueId = 'variable_value_changed';

    public readonly name = 'Variable Value Changed';

    public readonly inputs: UserInput[] = [
      {
        uniqueId: 'variable',
        name: 'Variable',
        required: true,
        allowsMultiple: false,
        kind: UserInput.Kind.variable,
      },
    ];

{'fraction_non_alphanumeric': 0.10848198034219148, 'fraction_numerical': 0.0, 'mean_word_length': 3.8465608465608465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3385904', 'n_tokens_mistral': 708, 'n_tokens_neox': 687, 'n_words': 182}