Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates type adapters for set of related types. Type adapter factories are most useful when several types share similar structure in their JSON form.

If a factory cannot support a given type, it must return undefined when that type is passed to TypeAdapterFactory.create. Factories should expect create() to be called on them for many types and should return undefined for most of those types.

As with type adapters, factories must be registered with a TysonBuilder for them to take effect:

const tysonBuilder = new TysonBuilder();
  .registerTypeAdapterFactory(new MyTypeAdapterFactory())
  .build();
export
interface

TypeAdapterFactory

Hierarchy

  • TypeAdapterFactory

Index

Methods

Methods

create

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc