///
/// FiredTimerType.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

/**
 * Represents the JS enum `FiredTimerType`, backed by a C++ enum.
 */
public typealias FiredTimerType = margelo.nitro.backgroundtimer.FiredTimerType

public extension FiredTimerType {
  /**
   * Get a FiredTimerType for the given String value, or
   * return `nil` if the given value was invalid/unknown.
   */
  init?(fromString string: String) {
    switch string {
      case "Timeout":
        self = .timeout
      case "Interval":
        self = .interval
      default:
        return nil
    }
  }

  /**
   * Get the String value this FiredTimerType represents.
   */
  var stringValue: String {
    switch self {
      case .timeout:
        return "Timeout"
      case .interval:
        return "Interval"
    }
  }
}
