![]()
Checks if the condition evaluates to true if goog.asserts.ENABLE_ASSERTS is
true.
Arguments:
Returns: T
The value of the condition.
|
code » | |||||
Checks if the value is an Array if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: !Array
The value, guaranteed to be a non-null array.
|
code » | |||||
Checks if the value is a boolean if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: boolean
The value, guaranteed to be a boolean when asserts are
enabled.
|
code » | |||||
Checks if the value is a DOM Element if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: !Element
The value, likely to be a DOM Element when asserts are
enabled.
|
code » | |||||
Checks if the value is a function if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: !Function
The value, guaranteed to be a function when asserts
enabled.
|
code » | |||||
![]()
Checks if the value is an instance of the user-defined type if
goog.asserts.ENABLE_ASSERTS is true.
The compiler may tighten the type returned by this function.
Arguments:
Returns: !T
No description.
|
code » | |||||
Checks if the value is a number if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: number
The value, guaranteed to be a number when asserts enabled.
|
code » | |||||
Checks if the value is an Object if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: !Object
The value, guaranteed to be a non-null object.
|
code » | |||||
![]()
Checks that no enumerable keys are present in Object.prototype. Such keys
would break most code that use
for (var ... in ...) loops.
|
code » | |||||
Checks if the value is a string if goog.asserts.ENABLE_ASSERTS is true.
Arguments:
Returns: string
The value, guaranteed to be a string when asserts enabled.
|
code » | |||||
![]()
Throws an exception with the given message and "Assertion failed" prefixed
onto it.
|
code » | |||||
![]()
Fails if goog.asserts.ENABLE_ASSERTS is true. This function is useful in case
when we want to add a check in the unreachable area like switch-case
statement:
switch(type) { case FOO: doSomething(); break; case BAR: doSomethingElse(); break; default: goog.assert.fail('Unrecognized type: ' + type); // We have only 2 types - "default:" section is unreachable code. }
Arguments:
|
code » |
![]()
No description.
|
Code » |