Skip to content

Commit

Permalink
componentProxyFactory - missing jsdocs added
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Oct 21, 2023
1 parent c393e78 commit 118d4cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions _dev/js/theme/utils/dynamicImports/componentProxyFactory.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @method handleProxyGet
* @param element
* @param proxyMethodHandler
* @return {(function(*, *, *): (*))|*}
*/
const handleProxyGet = (element, proxyMethodHandler) => (target, prop, receiver) => {
if (target[prop] !== undefined) {
return target[prop];
Expand All @@ -6,6 +12,13 @@ const handleProxyGet = (element, proxyMethodHandler) => (target, prop, receiver)
return (...args) => proxyMethodHandler(target, prop, receiver, element, args);
};

/**
* @method componentProxyFactory
* @param element {HTMLElement} - component element
* @param options {object} - component options
* @param proxyMethodHandler {function} - proxy method handler
* @return {{_options, _element}} - component proxy
*/
const componentProxyFactory = (
element,
options,
Expand Down

0 comments on commit 118d4cd

Please sign in to comment.