Options
All
  • Public
  • Public/Protected
  • All
Menu

An abstract base class for the customer entity in our application.

Notice how TypeDoc shows the inheritance hierarchy for our class.

Hierarchy

Index

Constructors

constructor

  • new Customer(id: number, name: string, nextOrderNumber: string | number): Customer
  • The constructor of the Customer class.

    Parameters

    • id: number

      the customer's database ID

    • name: string

      the customer's name

    • nextOrderNumber: string | number

      the next number to use when this customer places an order

    Returns Customer

Properties

Readonly id

id: number

A public readonly property.

name

name: string

A public property that can be reassigned.

Protected Optional contactName

contactName?: string

An optional protected property.

Private _nextOrderNumber

_nextOrderNumber: number = 0

A private property that is accessed via a getter and setter.

Accessors

nextOrderNumber

  • get nextOrderNumber(): string
  • set nextOrderNumber(value: string | number): void

Methods

onOrderPlaced

  • onOrderPlaced(): void

onOrderPlacedArrowFunction

  • onOrderPlacedArrowFunction(): void
  • A public method that's defined using an arrow function.

    TypeDoc knows to document this as a method rather than a property.

    Returns void

Protected isValid

  • isValid(): boolean

Private doInternalStuff

  • doInternalStuff(): void

Generated using TypeDoc