Options
All
  • Public
  • Public/Protected
  • All
Menu

A class used to indicate what type of environment the node process is currently running in.

Hierarchy

Index

Properties

Static DEVELOPMENT

DEVELOPMENT: EnvironmentType = ...

Type used to indicate the application is running in a development environment.

static

Static PRODUCTION

PRODUCTION: EnvironmentType = ...

Type used to indicate the application is running in a production environment.

static

Static SUPPORTED_TYPES

SUPPORTED_TYPES: EnvironmentType[] = ...

An array containing all the supported EnvironmentType values. Anything not in this array is either deprecated,
or an invalid EnvironmentType.

static

Static TEST

TEST: EnvironmentType = ...

Type used to indicate the application is running in a testing environment. This should largely be set by the
testing framework.

static

Static Protected TYPE

TYPE: string = "EnvironmentType"

Variable used to hold the type information for the EnvironmentType class, which is used to build the
EnvironmentType's representation when converted to a string.

static

Protected code

code: string

The code for the CustomType. Required.

Protected text

text: string

The text readable value for the CustomType. Required.

Protected type

type: string

The CustomType defined as a string value. Required.

Methods

Static getClassType

  • getClassType(): string

Static getEnvironmentType

Static isEqual

  • Checks if two CustomTypes are equal to each other or not.

    static

    Parameters

    • customType1: CustomType

      The first CustomType to check with.

    • customType2: CustomType

      The second CustomType to check with.

    Returns boolean

    True if the CustomTypes are equal, otherwise false.

Static isStrictEqual

Static toString

  • toString(): string

Static validateType

  • Validates that a supplied EnvironmentType is valid.

    static

    Parameters

    Returns boolean

    True if the provided EnvironmentType is valid, otherwise false.

getCode

  • getCode(): string

getText

  • getText(): string

getType

  • getType(): string

isDev

  • isDev(): boolean

isEqual

  • Checks if a CustomType is equal to a provided CustomType.

    Parameters

    • customType: CustomType

      The CustomType to compare.

    Returns boolean

    True if the provided CustomType is equal to the current CustomType, otherwise false.

isProd

  • isProd(): boolean

isStrictEqual

  • Strictly checks if a CustomType is equal to a provided CustomType.

    Parameters

    • customType: CustomType

      The CustomType to compare.

    Returns boolean

    True if the provided CustomType is strict equal to the current CustomType, otherwise false.

isTest

  • isTest(): boolean

isValid

  • isValid(): (string | boolean)[]
  • Validation method for the CustomType class. Ensures that a CustomType is built correctly.

    Returns (string | boolean)[]

    An array with a true/false value indicating if the CustomType is valid
    or not, and either an empty string when valid, or a string containing the error message when invalid.

toString

  • toString(): string

Constructors

constructor

Generated using TypeDoc