Skip to content

Commit

Permalink
Type Assertions for positional + optional/named Arguments
Browse files Browse the repository at this point in the history
Type Assertions for positional plus optional/named Arguments
angular#7
  • Loading branch information
xmlking committed Jul 22, 2014
1 parent 6caafd2 commit 061b341
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ function prettyPrint(value) {

function isType(value, T, errors) {

if (typeof value === 'undefined') {
return true;
}

if (T === primitives.void) {
return typeof value === 'undefined';
}
Expand Down

0 comments on commit 061b341

Please sign in to comment.