Options
All
  • Public
  • Public/Protected
  • All
Menu

The ValidationContainer holds all validation contexts created by the validation decorators.

Hierarchy

  • ValidationContainer

Index

Constructors

constructor

Properties

Static cache

cache: Map<string, ValidationContext[]> = ...

The index for all of the ValidationContext instances. Not meant to be accessed directly. Only decorators should be modifying the state of the cache by using the @see addValidationContext method.

The key of the cache consists of the class name and prperty name.

Static metaClasses

metaClasses: Map<string, MetaClass> = ...

Meta classes which have a one to one correspondence with each decorated class.

Methods

Static addMetaClassAndPropertyIfAbsent

  • addMetaClassAndPropertyIfAbsent(target: any, propertyName: string): void
  • Adds the MetaClass instance corresponding to the target parameter if it does not already exist.

    Also adds the propertyName parameter to the MetaClass instance if that does not exist.

    Parameters

    • target: any
    • propertyName: string

    Returns void

Static addValidationContext

  • throws

    Error if attempting to add a ValidationContext with a signature that duplicates that of an instance already contained.

    If an exception thrown it indicates that a duplicate class definition exist in the runtime. In other words the same class definition is loaded more than once because it exists in multiple files.

    Parameters

    Returns void

Generated using TypeDoc