The constructor of the DeliveryCustomer
class.
the customer's database ID
the customer's name
the next number to use when this customer places an order
whether this customer has a basic or enterprise subscription
Readonly
idA public readonly property.
A public property that can be reassigned.
Protected
Optional
contactAn optional protected property.
Optional
preferredA property defined on the subclass.
Readonly
subscriptionAnother property defined on the subclass.
A getter that prepends a number sign to the private _nextOrderNumber
property.
A setter that takes in either a string or a number and sets the private
_nextOrderNumber
property.
A public method. To be called when an order is placed for this customer.
A public method that's defined using an arrow function.
TypeDoc knows to document this as a method rather than a property.
Protected
isAn example of overriding a protected method.
A DeliveryCustomer
can only have a preferred courier if its
subscription type is enterprise.
A class that extends
Customer
.Notice how TypeDoc shows the inheritance hierarchy for our class.