0

I see this a lot in the Protractor documentation,

/**
 * ...
 * ...
 *
 * @returns {!webdriver.promise.Promise} A promise which resolves to the
 *     number of elements matching the locator.
 */

What is going on there with the negation of the return object? When is it used?

I'll concede that perhaps it is not strictly "negation," but the notation should be documented somewhere.

Thanks!

javafueled
  • 494
  • 1
  • 5
  • 23

1 Answers1

2

As per JSDoc spec:

Non-nullable type

{!number} A number, but never null

Indicates that the value is of the specified type, but cannot be null.

yuriy636
  • 11,171
  • 5
  • 37
  • 42