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

Function pendingDeprecate

lib/internal/util.js:157–172  ·  view source on GitHub ↗
(fn, msg, code)

Source from the content-addressed store, hash-verified

155// at snapshot building time as the warning permission is only queried at
156// run time.
157function pendingDeprecate(fn, msg, code) {
158 const emitDeprecationWarning = getDeprecationWarningEmitter(
159 code, msg, deprecated, false, isPendingDeprecation,
160 );
161 function deprecated(...args) {
162 emitDeprecationWarning();
163 return ReflectApply(fn, this, args);
164 }
165
166 ObjectDefineProperty(deprecated, 'length', {
167 __proto__: null,
168 ...ObjectGetOwnPropertyDescriptor(fn, 'length'),
169 });
170
171 return deprecated;
172}
173
174// Mark that a method should not be used.
175// Returns a modified function which warns once by default.

Callers 1

loader.jsFile · 0.85

Calls 1

Tested by

no test coverage detected