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

Function _makeSafe

docs/app/js/sanddance-app.js:22725–22736  ·  view source on GitHub ↗
(obj, prototype, methodName)

Source from the content-addressed store, hash-verified

22723}
22724// eslint-disable-next-line deprecation/deprecation
22725function _makeSafe(obj, prototype, methodName) {
22726 /* eslint-disable @typescript-eslint/no-explicit-any */ var classMethod = obj[methodName];
22727 var prototypeMethod = prototype[methodName];
22728 if (classMethod || prototypeMethod) obj[methodName] = function() {
22729 var args = [];
22730 for(var _i = 0; _i < arguments.length; _i++)args[_i] = arguments[_i];
22731 /* eslint-enable @typescript-eslint/no-explicit-any */ var retVal;
22732 if (prototypeMethod) retVal = prototypeMethod.apply(this, args);
22733 if (classMethod !== prototypeMethod) retVal = classMethod.apply(this, args);
22734 return retVal;
22735 };
22736}
22737function nullRender() {
22738 return null;
22739}

Callers 1

_makeAllSafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected