Members
(inner) deprecationWarning
Prints out a deprecation warning to the console.warn with the format:
`name` is deprecated, use `alternative` instead.
It can also print out a stack trace with the line numbers.
- Source:
Methods
(static) callDeprecatedFunction(scope, callback, name, alternative) → {*}
To call a function immediately and log a deprecation warning
Parameters:
Name | Type | Description |
---|---|---|
scope |
||
callback |
||
name |
||
alternative |
- Source:
Returns:
- Type
- *
(static) deprecateMethod(scope, deprecatedFunction, name, alternative) → {function}
Provides a function that can replace a method that has been deprecated.
Prints out a deprecation warning to the console.warn with the format:
`name` is deprecated, use `alternative` instead.
It will also print out a stack trace with the line numbers.
Parameters:
Name | Type | Description |
---|---|---|
scope |
Object | The object that will be used as the `this` when the `deprecatedFunction` is applied. |
deprecatedFunction |
function | The function object that is deprecated. |
name |
String | Name of the method that is deprecated. |
alternative |
String | Name of alternative method that should be used instead. |
- Source:
Returns:
deprecationWrapper
- Type
- function
(static) deprecationWarningOnce(name, alternative, stackTraceLimitopt)
Call deprecationWarning function only once.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | Name of the thing that is deprecated. | |
alternative |
String | Name of alternative that should be used instead. | |
stackTraceLimit |
Number |
<optional> |
depth of the stack trace to print out. Set to falsy value to disable stack. |
- Source: