Shorthand validation that a value exists.
The condition to validate against.
Message to throw if condition fails. Default value of Assertion failed.
Assertion failed
assert(user != null, "User not found");// Now `user` is not null or undefined in TS's eyes. Copy
assert(user != null, "User not found");// Now `user` is not null or undefined in TS's eyes.
Shorthand validation that a value exists.