Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Registration<T>

Registrations allow the serializer to handle inheritance, they have to be defined if you want to be able to handle inheritance.

Example:

let registrations =
[
     {
         parent: Foo,
         children:
         {
             'bar':Bar,
             'baz':Baz
         }
     }
]

Type parameters

  • T

Hierarchy

  • Registration

Index

Properties

children

children: object

Possible children, by key.

Type declaration

  • [index: string]: Class<T>

Optional discriminatorHandler

discriminatorHandler: Class

Used to define which class handles the discrimination logic, defaults to parent's value.

parent

parent: Class<T>

The class that all children have to extend no matter what.

It can contain the discrimination logic, but if you want to handle inheritance constraint and discriminator separately, you have to specify the handler class in discriminatorHandler

Generated using TypeDoc