WalkInCustomer
Hierarchy (View Summary)
- Customer- WalkInCustomer
 
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
new WalkInCustomer(
    id: number,
    name: string,
    nextOrderNumber: string | number,
): WalkInCustomerThe 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 WalkInCustomer
Properties
Readonlyid
id: number
A public readonly property.
name
name: string
A public property that can be reassigned.
Protected Optionalcontact
contactName?: string
An optional protected property.
Optionaltrusted
trustedCustomer?: boolean
A property defined on the subclass.
Accessors
next
- get nextOrderNumber(): stringA getter that prepends a number sign to the private _nextOrderNumberproperty.Returns string
- set nextOrderNumber(value: string | number): voidA setter that takes in either a string or a number and sets the private _nextOrderNumberproperty.Parameters- value: string | number
 Returns void
Methods
on
onOrderPlacedArrowFunction(): voidA public method that's defined using an arrow function.
TypeDoc knows to document this as a method rather than a property.
Returns void
Protectedis
isValid(): booleanA protected method.
Returns boolean
on
onOrderPlaced(): voidAn example of overriding a public method.
A class that extends
Customer.Notice how TypeDoc shows the inheritance hierarchy for our class.