Assert by throwing a programmer error.
assert(condition: boolean, msg?: string): condition
throws Error containing the specified message if condition is false.
note This function should be used to validate conditions that should never realistically occur, or which indicate a misuse of the API which should be eliminated during development.
|condition||boolean||The result of a boolean expression.|
|msg||string||An optional message to include in the thrown exception. Defaults to "Programmer Error".|
Last Updated: 01 April, 2020