MCPcopy Create free account
hub / github.com/microsoft/SandDance / defineDeprecationWarning

Function defineDeprecationWarning

docs/external/js/react.development.js:591–599  ·  view source on GitHub ↗
(methodName, info)

Source from the content-addressed store, hash-verified

589 };
590
591 var defineDeprecationWarning = function (methodName, info) {
592 Object.defineProperty(Component.prototype, methodName, {
593 get: function () {
594 warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
595
596 return undefined;
597 }
598 });
599 };
600
601 for (var fnName in deprecatedAPIs) {
602 if (deprecatedAPIs.hasOwnProperty(fnName)) {

Callers 1

Calls 1

warnFunction · 0.70

Tested by

no test coverage detected