<commit_before>///<reference path="../reference.ts" />

module Plottable {
export module Animator {

  /**
   * The default animator implementation with easing, duration, and delay.
   */
  export class DefaultAnimator implements IPlotAnimator {
    public _durationMsec: Number = 300;
    public _delayMsec: Number    = 0;
    public _easing: string       = "exp-out";

    public animate(selection: any, attrToProjector: Abstract.IAttributeToProjector, plot: Abstract.Plot): any {
      return selection.transition()
        .ease(this._easing)
        .duration(this._durationMsec)
        .delay(this._delayMsec)
        .attr(attrToProjector);
    }

    /**
     * Gets or sets the duration of the animation in milliseconds.
     *
     * @param {Number} duration The duration in milliseconds.
     * @return {Number|DefaultAnimator} Returns this object for chaining or
     *     the current duration if no argument is supplied.
     */
    public duration(): Number;
    public duration(duration: Number): DefaultAnimator;
    public duration(duration?: Number): any{
      if (duration == null) {
        return this._durationMsec;
      } else {
        this._durationMsec = duration;
        return this;
      }
    }

    /**
     * Gets or sets the delay of the animation in milliseconds.
     *
     * @param {Number} delay The delay in milliseconds.
     * @return {Number|DefaultAnimator} Returns this object for chaining or
     *     the current delay if no argument is supplied.
     */
    public delay(): Number;
    public delay(delay: Number): DefaultAnimator;
    public delay(delay?: Number): any{
      if (delay == null) {
        return this._delayMsec;
      } else {
        this._delayMsec = delay;
        return this;
      }
    }

    /**
     * Gets or sets the easing string of the animation in milliseconds.
     *
     * @param {string} easing The easing string.
     * @return {string|DefaultAnimator} Returns this object for chaining or
     *     the current easing string if no argument is supplied.
     */
    public easing(): string;
    public easing(easing: string): DefaultAnimator;
    public easing(easing?: string): any{
      if (easing == null) {
        return this._easing;
      } else {
        this._easing = easing;
        return this;
      }
    }
  }

}
}
<commit_msg>switch to preferred style of undefined check.<commit_after>///<reference path="../reference.ts" />

module Plottable {
export module Animator {

  /**
   * The default animator implementation with easing, duration, and delay.
   */
  export class DefaultAnimator implements IPlotAnimator {
    public _durationMsec: Number = 300;
    public _delayMsec: Number    = 0;
    public _easing: string       = "exp-out";

    public animate(selection: any, attrToProjector: Abstract.IAttributeToProjector, plot: Abstract.Plot): any {
      return selection.transition()
        .ease(this._easing)
        .duration(this._durationMsec)
        .delay(this._delayMsec)
        .attr(attrToProjector);
    }

    /**
     * Gets or sets the duration of the animation in milliseconds.
     *
     * @param {Number} duration The duration in milliseconds.
     * @return {Number|DefaultAnimator} Returns this object for chaining or
     *     the current duration if no argument is supplied.
     */
    public duration(): Number;
    public duration(duration: Number): DefaultAnimator;
    public duration(duration?: Number): any{
      if (duration === undefined) {
        return this._durationMsec;
      } else {
        this._durationMsec = duration;
        return this;
      }
    }

    /**
     * Gets or sets the delay of the animation in milliseconds.
     *
     * @param {Number} delay The delay in milliseconds.
     * @return {Number|DefaultAnimator} Returns this object for chaining or
     *     the current delay if no argument is supplied.
     */
    public delay(): Number;
    public delay(delay: Number): DefaultAnimator;
    public delay(delay?: Number): any{
      if (delay === undefined) {
        return this._delayMsec;
      } else {
        this._delayMsec = delay;
        return this;
      }
    }

    /**
     * Gets or sets the easing string of the animation in milliseconds.
     *
     * @param {string} easing The easing string.
     * @return {string|DefaultAnimator} Returns this object for chaining or
     *     the current easing string if no argument is supplied.
     */
    public easing(): string;
    public easing(easing: string): DefaultAnimator;
    public easing(easing?: string): any{
      if (easing === undefined) {
        return this._easing;
      } else {
        this._easing = easing;
        return this;
      }
    }
  }

}
}

{'fraction_non_alphanumeric': 0.09584393553859202, 'fraction_numerical': 0.0016963528413910093, 'mean_word_length': 2.4280523255813953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2992941', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1292, 'n_words': 426}