chore: add removeFunction to deprecate module (#14468)
* chore: add removeFunction function to deprecate api * re-comment deprecate.member
This commit is contained in:
parent
7f22442228
commit
9bf1fb323b
1 changed files with 10 additions and 4 deletions
|
@ -73,9 +73,7 @@ deprecate.setHandler = (handler) => {
|
||||||
|
|
||||||
deprecate.getHandler = () => deprecationHandler
|
deprecate.getHandler = () => deprecationHandler
|
||||||
|
|
||||||
// None of the below methods are used, and so will be commented
|
// Commented out until such time as it is needed
|
||||||
// out until such time that they are needed to be used and tested.
|
|
||||||
|
|
||||||
// // Forward the method to member.
|
// // Forward the method to member.
|
||||||
// deprecate.member = (object, method, member) => {
|
// deprecate.member = (object, method, member) => {
|
||||||
// let warned = false
|
// let warned = false
|
||||||
|
@ -88,9 +86,17 @@ deprecate.getHandler = () => deprecationHandler
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// Remove a property with no replacement
|
||||||
deprecate.removeProperty = (object, deprecatedName) => {
|
deprecate.removeProperty = (object, deprecatedName) => {
|
||||||
if (!process.noDeprecation) {
|
if (!process.noDeprecation) {
|
||||||
deprecate.log(`The '${deprecatedName}' property has been deprecated.`)
|
deprecate.log(`The '${deprecatedName}' property of ${object} has been deprecated and marked for removal.`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove a function with no replacement
|
||||||
|
deprecate.removeFunction = (deprecatedName) => {
|
||||||
|
if (!process.noDeprecation) {
|
||||||
|
deprecate.log(`The '${deprecatedName}' function has been deprecated and marked for removal.`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue