Represents an execution environment. This is a helper to evaluate the ["requiredExecutionEnvironment"] and ["excludedExecutionEnvironment"] information.

interface ExecutionEnvironment {
    getCurrent(): readonly ExecutionEnvironmentState[];
    getVersion(env: string): string | number | boolean;
    isOneSupported(envList: readonly string[]): boolean;
    isSupported(env: string): boolean;
}

Methods

  • Get the current version for a given environment name

    Parameters

    • env: string

      e.g. 'FF'

    Returns string | number | boolean

    the version if the environment is known or false if it is unknown or unsupported

  • Checks if the given environments are supported.

    Parameters

    • envList: readonly string[]

      e.g ['IE:[7,]','FF:[14,]']

    Returns boolean

    true if one of the environments is supported

  • Check if a given environment is supported.

    Parameters

    • env: string

      e.g. 'FF:[14,]'

    Returns boolean

    true if the environment is supported