Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
[js] for type-checking, suppress a bunch of warnings about referencing
Browse files Browse the repository at this point in the history
a deprecated type
  • Loading branch information
jleyba committed Mar 11, 2016
1 parent daf0539 commit 9da7301
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions javascript/node/selenium-webdriver/lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class WebDriverError extends Error {
/**
* @return {number} the legacy numeric code for this class of error.
* @deprecated
* @suppress {deprecated} Ignore warnings about reference to deprecated
* ErrorCode type.
*/
static get code() {
return ErrorCode.UNKNOWN_ERROR;
Expand All @@ -57,7 +59,7 @@ class ElementNotSelectableError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.ELEMENT_NOT_SELECTABLE;
}
Expand All @@ -74,7 +76,7 @@ class ElementNotVisibleError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.ELEMENT_NOT_VISIBLE;
}
Expand Down Expand Up @@ -102,7 +104,7 @@ class InvalidCookieDomainError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.INVALID_COOKIE_DOMAIN;
}
Expand All @@ -118,7 +120,7 @@ class InvalidElementCoordinatesError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.INVALID_ELEMENT_COORDINATES;
}
Expand All @@ -136,7 +138,7 @@ class InvalidElementStateError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.INVALID_ELEMENT_STATE;
}
Expand All @@ -152,7 +154,7 @@ class InvalidSelectorError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.INVALID_SELECTOR_ERROR;
}
Expand Down Expand Up @@ -190,7 +192,7 @@ class JavascriptError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.JAVASCRIPT_ERROR;
}
Expand All @@ -207,7 +209,7 @@ class MoveTargetOutOfBoundsError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS;
}
Expand All @@ -223,7 +225,7 @@ class NoSuchAlertError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.NO_SUCH_ALERT;
}
Expand All @@ -240,7 +242,7 @@ class NoSuchElementError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.NO_SUCH_ELEMENT;
}
Expand All @@ -257,7 +259,7 @@ class NoSuchFrameError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.NO_SUCH_FRAME;
}
Expand All @@ -274,7 +276,7 @@ class NoSuchWindowError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.NO_SUCH_WINDOW;
}
Expand All @@ -290,7 +292,7 @@ class ScriptTimeoutError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.SCRIPT_TIMEOUT;
}
Expand All @@ -306,7 +308,7 @@ class SessionNotCreatedError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.SESSION_NOT_CREATED;
}
Expand All @@ -324,7 +326,7 @@ class StaleElementReferenceError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.STALE_ELEMENT_REFERENCE;
}
Expand All @@ -340,7 +342,7 @@ class TimeoutError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.TIMEOUT;
}
Expand All @@ -356,7 +358,7 @@ class UnableToSetCookieError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.UNABLE_TO_SET_COOKIE;
}
Expand Down Expand Up @@ -389,7 +391,7 @@ class UnexpectedAlertOpenError extends WebDriverError {
this.text_ = opt_text;
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.UNEXPECTED_ALERT_OPEN;
}
Expand All @@ -413,7 +415,7 @@ class UnknownCommandError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.UNSUPPORTED_OPERATION;
}
Expand All @@ -430,7 +432,7 @@ class UnknownMethodError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.UNSUPPORTED_OPERATION;
}
Expand All @@ -446,7 +448,7 @@ class UnsupportedOperationError extends WebDriverError {
super(opt_error);
}

/** @override */
/** @override @suppress {deprecated} */
static get code() {
return ErrorCode.UNSUPPORTED_OPERATION;
}
Expand Down

0 comments on commit 9da7301

Please sign in to comment.