From 118d4cd6eb4e0a7683a5d3d907fd64a00fe6c1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Ste=CC=A8pien=CC=81?= Date: Sat, 21 Oct 2023 02:55:23 +0200 Subject: [PATCH] componentProxyFactory - missing jsdocs added --- .../utils/dynamicImports/componentProxyFactory.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/_dev/js/theme/utils/dynamicImports/componentProxyFactory.js b/_dev/js/theme/utils/dynamicImports/componentProxyFactory.js index 4921ed41..fe99a797 100644 --- a/_dev/js/theme/utils/dynamicImports/componentProxyFactory.js +++ b/_dev/js/theme/utils/dynamicImports/componentProxyFactory.js @@ -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]; @@ -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,