Class Deprecated
Utility to warn and manage deprecations
Defined in: deprecated.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Deprecated.deprecated(msg, fnc, args)
Wraps a function to display a deprecation warning message
each time that function is called.
|
<static> |
Deprecated.deprecatedROProp(obj, propName, msg, value)
define and marks a property as deprecated.
|
<static> |
Deprecated.log(msg)
displays a message for deprecation
|
Method Detail
<static>
{function}
Deprecated.deprecated(msg, fnc, args)
Wraps a function to display a deprecation warning message
each time that function is called.
- Parameters:
- {string} msg
- The message to display
- {function} fnc
- The function to wrap
- {Array or Array-like Object} args Optional
- The arguments to pass to the wrapped function
- Returns:
- {function} The wrapped function
<static>
Deprecated.deprecatedROProp(obj, propName, msg, value)
define and marks a property as deprecated. The defined property is read-only.
- Parameters:
- {object} obj
- The object for which we define the new property
- {string} propName
- The name of the property
- {string} msg
- The deprecation message
- {*} value
- The value returned when accessing the property
<static>
Deprecated.log(msg)
displays a message for deprecation
- Parameters:
- {String} msg
- The message to display