You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
I should be able to require that a value is exactly the type I specify, and expect it to throw if given null.
varval=null;assert.type(val,assert.string);
That assertion passes in the current implementation. It would be nice be able to indicate that a value is nullable: assert.type(val, assert.string, true);
Or if we wanted to extend the language to support this: assert.type(?val, assert.string); or non-nullable: assert.type(!val, assert.string);.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I should be able to require that a value is exactly the type I specify, and expect it to throw if given
null
.That assertion passes in the current implementation. It would be nice be able to indicate that a value is nullable:
assert.type(val, assert.string, true);
Or if we wanted to extend the language to support this:
assert.type(?val, assert.string);
or non-nullable:assert.type(!val, assert.string);
.The text was updated successfully, but these errors were encountered: