MCPcopy Index your code
hub / github.com/nodejs/node / emitMakeCallbackDeprecation

Function emitMakeCallbackDeprecation

lib/domain.js:125–136  ·  view source on GitHub ↗
({ target, method })

Source from the content-addressed store, hash-verified

123
124let sendMakeCallbackDeprecation = false;
125function emitMakeCallbackDeprecation({ target, method }) {
126 if (!sendMakeCallbackDeprecation) {
127 process.emitWarning(
128 'Using a domain property in MakeCallback is deprecated. Use the ' +
129 'async_context variant of MakeCallback or the AsyncResource class ' +
130 'instead. ' +
131 `(Triggered by calling ${method?.name || '<anonymous>'} ` +
132 `on ${target?.constructor?.name}.)`,
133 'DeprecationWarning', 'DEP0097');
134 sendMakeCallbackDeprecation = true;
135 }
136}
137
138function topLevelDomainCallback(cb, ...args) {
139 const domain = this.domain;

Callers 1

topLevelDomainCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…