diff --git a/src/helpers/cookie-utils.js b/src/helpers/cookie-utils.js index 6335df42..39d27f56 100644 --- a/src/helpers/cookie-utils.js +++ b/src/helpers/cookie-utils.js @@ -1,9 +1,5 @@ import { nativeIsNaN } from './number-utils'; -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Checks whether the input path is supported * diff --git a/src/helpers/hit.js b/src/helpers/hit.js index 424eee84..ac88b531 100644 --- a/src/helpers/hit.js +++ b/src/helpers/hit.js @@ -1,13 +1,9 @@ /* eslint-disable no-console, no-underscore-dangle */ -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Hit used only for debug purposes now * - * @param {Source} source + * @param {object} source scriptlet properties * use LOG_MARKER = 'log: ' at the start of a message * for logging scriptlets */ diff --git a/src/helpers/injector.js b/src/helpers/injector.js index acfd8017..b67f0649 100644 --- a/src/helpers/injector.js +++ b/src/helpers/injector.js @@ -1,7 +1,3 @@ -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Concat dependencies to scriptlet code * @@ -48,7 +44,7 @@ export function addCall(scriptlet, code) { * function noeval(source) { alert(source); } * noeval.apply(this, args); * )({"args": ["aaa", "bbb"], "name":"noeval"}, ["aaa", "bbb"])` - * @param {Source} source - object with scriptlet properties + * @param {object} source - object with scriptlet properties * @param {string} code - scriptlet source code with dependencies * @param {boolean} redirect if function is redirect * @returns {string} full scriptlet code diff --git a/src/helpers/log-message.js b/src/helpers/log-message.js index 6493647e..ceb038ea 100644 --- a/src/helpers/log-message.js +++ b/src/helpers/log-message.js @@ -1,14 +1,10 @@ -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Conditionally logs message to console. * Convention is to log messages by source.verbose if such log * is not a part of scriptlet's functionality, eg on invalid input, * and use 'forced' argument otherwise. * - * @param {Source} source required + * @param {object} source required, scriptlet properties * @param {string} message required, message to log * @param {boolean} [forced=false] to log message unconditionally */ diff --git a/src/helpers/match-request-props.js b/src/helpers/match-request-props.js index 720c675f..be868a49 100644 --- a/src/helpers/match-request-props.js +++ b/src/helpers/match-request-props.js @@ -5,16 +5,12 @@ import { } from './request-utils'; import { logMessage } from './log-message'; -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Checks if given propsToMatch string matches with given request data * This is used by prevent-xhr, prevent-fetch, trusted-replace-xhr-response * and trusted-replace-fetch-response scriptlets * - * @param {Source} source scriptlet properties + * @param {object} source scriptlet properties * @param {string} propsToMatch string of space-separated request properties to match * @param {object} requestData object with standard properties of fetch/xhr like url, method etc * @returns {boolean} if request properties match diff --git a/src/helpers/storage-utils.js b/src/helpers/storage-utils.js index 338a0867..ff7e35e2 100644 --- a/src/helpers/storage-utils.js +++ b/src/helpers/storage-utils.js @@ -1,14 +1,10 @@ import { nativeIsNaN } from './number-utils'; import { logMessage } from './log-message'; -/** - * @typedef { import('../scriptlets/index').Source } Source - */ - /** * Sets item to a specified storage, if storage isn't full. * - * @param {Source} source scriptlet's configuration + * @param {object} source scriptlet's configuration * @param {Storage} storage storage instance to set item into * @param {string} key storage key * @param {string} value staroge value