Options
All
  • Public
  • Public/Protected
  • All
Menu

A Model is a class that holds the data object for an application as well as a presenter class function which is used to call the state update method

export
class

Model

template

T the class that defines the shape of the data

Type parameters

  • T

Hierarchy

  • Model

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Model(presenter: function, validationMethod: function): Model
  • Parameters

    • presenter: function
        • (props: T): any
        • Parameters

          • props: T

          Returns any

    • validationMethod: function
        • (props: T, oldProps?: T): T
        • Parameters

          • props: T
          • Optional oldProps: T

          Returns T

    Returns Model

Properties

presenter

presenter: function

Type declaration

    • (props: T): any
    • Parameters

      • props: T

      Returns any

props

props: T

validator

validator: function

Type declaration

    • (props: T, oldProps?: T): T
    • Parameters

      • props: T
      • Optional oldProps: T

      Returns T

Methods

present

  • present(newProps: T): any
  • Parameters

    • newProps: T

    Returns any

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