diff --git a/lib/async_hooks.js b/lib/async_hooks.js index d4937c33011692..46838304a39cfd 100644 --- a/lib/async_hooks.js +++ b/lib/async_hooks.js @@ -143,17 +143,6 @@ function triggerAsyncId() { const destroyedSymbol = Symbol('destroyed'); -let emitBeforeAfterWarning = true; -function showEmitBeforeAfterWarning() { - if (emitBeforeAfterWarning) { - process.emitWarning( - 'asyncResource.emitBefore and emitAfter are deprecated. Please use ' + - 'asyncResource.runInAsyncScope instead', - 'DeprecationWarning', 'DEP0098'); - emitBeforeAfterWarning = false; - } -} - class AsyncResource { constructor(type, opts = {}) { if (typeof type !== 'string') @@ -189,13 +178,11 @@ class AsyncResource { } emitBefore() { - showEmitBeforeAfterWarning(); emitBefore(this[async_id_symbol], this[trigger_async_id_symbol]); return this; } emitAfter() { - showEmitBeforeAfterWarning(); emitAfter(this[async_id_symbol]); return this; }