From 5811bce595f8f5bb48c49a4d5ab6247649b0af2e Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Fri, 11 Oct 2024 19:42:53 +0200 Subject: [PATCH] fix: some minor fixes --- example/components/host/host.mjs | 0 example/components/notify/message.mjs | 4 --- example/components/notify/notify.mjs | 4 --- example/components/state/log.mjs | 0 example/components/state/state.mjs | 0 example/constraints/andoperator.mjs | 17 ------------- example/constraints/invalid.mjs | 6 ----- example/constraints/isarray.mjs | 11 -------- example/constraints/isobject.mjs | 12 --------- example/constraints/oroperator.mjs | 15 ----------- example/constraints/valid.mjs | 6 ----- example/dom/customelement.mjs | 14 ----------- example/dom/theme.mjs | 5 ---- example/dom/updater.mjs | 23 ----------------- example/util/comparator.mjs | 10 -------- example/util/deadmansswitch.mjs | 9 ------- example/util/processing.mjs | 17 ------------- source/components/content/copy.mjs | 9 ++++--- source/components/state/log.mjs | 36 --------------------------- source/constraints/andoperator.mjs | 6 ++--- source/constraints/invalid.mjs | 6 ++--- source/constraints/isarray.mjs | 6 ++--- source/constraints/isobject.mjs | 6 ++--- source/constraints/oroperator.mjs | 6 ++--- source/constraints/valid.mjs | 4 +-- source/data/buildmap.mjs | 3 ++- source/dom/updater.mjs | 9 +++---- source/i18n/providers/embed.mjs | 4 +-- source/types/basewithoptions.mjs | 7 +++--- source/types/is.mjs | 10 -------- source/util/comparator.mjs | 3 +-- source/util/deadmansswitch.mjs | 12 +++++---- source/util/processing.mjs | 6 ++--- 33 files changed, 44 insertions(+), 242 deletions(-) delete mode 100644 example/components/host/host.mjs delete mode 100644 example/components/notify/message.mjs delete mode 100644 example/components/notify/notify.mjs delete mode 100644 example/components/state/log.mjs delete mode 100644 example/components/state/state.mjs delete mode 100644 example/constraints/andoperator.mjs delete mode 100644 example/constraints/invalid.mjs delete mode 100644 example/constraints/isarray.mjs delete mode 100644 example/constraints/isobject.mjs delete mode 100644 example/constraints/oroperator.mjs delete mode 100644 example/constraints/valid.mjs delete mode 100644 example/dom/customelement.mjs delete mode 100644 example/dom/theme.mjs delete mode 100644 example/dom/updater.mjs delete mode 100644 example/util/comparator.mjs delete mode 100644 example/util/deadmansswitch.mjs delete mode 100644 example/util/processing.mjs diff --git a/example/components/host/host.mjs b/example/components/host/host.mjs deleted file mode 100644 index e69de29bb..000000000 diff --git a/example/components/notify/message.mjs b/example/components/notify/message.mjs deleted file mode 100644 index 71bd46b6f..000000000 --- a/example/components/notify/message.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import {Notify} from '@schukai/component-notify/source/message.js'; - -const notify = document.createElement('monster-notify'); -document.body.appendChild(notify); diff --git a/example/components/notify/notify.mjs b/example/components/notify/notify.mjs deleted file mode 100644 index 84dce9851..000000000 --- a/example/components/notify/notify.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import {Notify} from '@schukai/component-notify/source/notify.mjs'; - -const notify = document.createElement('monster-notify'); -document.body.appendChild(notify); \ No newline at end of file diff --git a/example/components/state/log.mjs b/example/components/state/log.mjs deleted file mode 100644 index e69de29bb..000000000 diff --git a/example/components/state/state.mjs b/example/components/state/state.mjs deleted file mode 100644 index e69de29bb..000000000 diff --git a/example/constraints/andoperator.mjs b/example/constraints/andoperator.mjs deleted file mode 100644 index 0c930c4e2..000000000 --- a/example/constraints/andoperator.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import {Valid} from '@schukai/monster/source/constraints/valid.mjs'; -import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs'; -import {AndOperator} from '@schukai/monster/source/constraints/andoperator.mjs'; - -new AndOperator( - new Valid(), new Valid()).isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ true - -new AndOperator( - new Invalid(), new Valid()).isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ false - - diff --git a/example/constraints/invalid.mjs b/example/constraints/invalid.mjs deleted file mode 100644 index 61a9e09e5..000000000 --- a/example/constraints/invalid.mjs +++ /dev/null @@ -1,6 +0,0 @@ -import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs'; - -new Invalid().isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ false \ No newline at end of file diff --git a/example/constraints/isarray.mjs b/example/constraints/isarray.mjs deleted file mode 100644 index 3a92e3c84..000000000 --- a/example/constraints/isarray.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import {IsArray} from '@schukai/monster/source/constraints/isarray.mjs'; - -new IsArray() - .isValid([]) - .then(() => console.log(true)); -// ↦ true - -new IsArray() - .isValid(99) - .catch(e => console.log(e)); -// ↦ 99 \ No newline at end of file diff --git a/example/constraints/isobject.mjs b/example/constraints/isobject.mjs deleted file mode 100644 index cbca5bf7a..000000000 --- a/example/constraints/isobject.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import {IsObject} from '@schukai/monster/source/constraints/isobject.mjs'; - -new IsObject() - .isValid({}) - .then(() => console.log(true)); -// ↦ true - - -new IsObject() - .isValid(99) - .catch(e => console.log(e)); -// ↦ 99 \ No newline at end of file diff --git a/example/constraints/oroperator.mjs b/example/constraints/oroperator.mjs deleted file mode 100644 index c68e987c0..000000000 --- a/example/constraints/oroperator.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import {Valid} from '@schukai/monster/source/constraints/valid.mjs'; -import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs'; -import {OrOperator} from '@schukai/monster/source/constraints/oroperator.mjs'; - -new OrOperator( - new Valid(), new Invalid()).isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ true - -new OrOperator( - new Invalid(), new Invalid()).isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ false \ No newline at end of file diff --git a/example/constraints/valid.mjs b/example/constraints/valid.mjs deleted file mode 100644 index df8d2dc1a..000000000 --- a/example/constraints/valid.mjs +++ /dev/null @@ -1,6 +0,0 @@ -import {Valid} from '@schukai/monster/source/constraints/valid.mjs'; - -new Valid().isValid() - .then(() => console.log(true)) - .catch(() => console.log(false)); -// ↦ true diff --git a/example/dom/customelement.mjs b/example/dom/customelement.mjs deleted file mode 100644 index abcb296de..000000000 --- a/example/dom/customelement.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import {CustomElement} from '@schukai/monster/source/dom/CustomElement'; -// In the example the user can use his own template by creating a template in the DOM with the ID `my-custom-element`. -// You can also specify a theme (for example `mytheme`), then it will search for the ID `my-custom-element-mytheme` and -// if not available for the ID `my-custom-element`. - -class MyCustomElement extends CustomElement { - - static getTag() { - return "my-custom-element" - } - -} - -// ↦ <my-custom-element></my-custom-element> \ No newline at end of file diff --git a/example/dom/theme.mjs b/example/dom/theme.mjs deleted file mode 100644 index a876922d2..000000000 --- a/example/dom/theme.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import {getDocumentTheme} from '@schukai/monster/source/dom/theme.mjs'; - -const theme = getDocumentTheme(); -console.log(theme.getName()); -// ↦ monster \ No newline at end of file diff --git a/example/dom/updater.mjs b/example/dom/updater.mjs deleted file mode 100644 index 09a014751..000000000 --- a/example/dom/updater.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import {Updater} from '@schukai/monster/source/dom/updater.mjs'; - -// First we prepare the html document. -// This is done here via script, but can also be inserted into the document as pure html. -// To do this, simply insert the tag <h1 data-monster-replace="path:headline"></h1>. -const body = document.querySelector('body'); -const headline = document.createElement('h1'); -headline.setAttribute('data-monster-replace', 'path:headline') -body.appendChild(headline); - -// the data structure -let obj = { - headline: "Hello World", -}; - -// Now comes the real magic. we pass the updater the parent HTMLElement -// and the desired data structure. -const updater = new Updater(body, obj); -updater.run(); - -// Now you can change the data structure and the HTML will follow these changes. -const subject = updater.getSubject(); -subject['headline'] = "Hello World!" \ No newline at end of file diff --git a/example/util/comparator.mjs b/example/util/comparator.mjs deleted file mode 100644 index 401af78e5..000000000 --- a/example/util/comparator.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import {Comparator} from '@schukai/monster/source/util/comparator.mjs'; - -console.log(new Comparator().lessThanOrEqual(2, 5)) -// ↦ true -console.log(new Comparator().greaterThan(4, 2)) -// ↦ true -console.log(new Comparator().equal(4, 4)) -// ↦ true -console.log(new Comparator().equal(4, 5)) -// ↦ false diff --git a/example/util/deadmansswitch.mjs b/example/util/deadmansswitch.mjs deleted file mode 100644 index 344fc8aad..000000000 --- a/example/util/deadmansswitch.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import {DeadMansSwitch} from '@schukai/monster/source/util/deadmansswitch.mjs'; - -const deadmansswitch = new DeadMansSwitch(100, () => { - console.log('yeah!') - // ↦ "yeah!" -}) - -deadmansswitch.touch(); // from here wait again 100 ms -deadmansswitch.touch(200); // from here wait 200 ms diff --git a/example/util/processing.mjs b/example/util/processing.mjs deleted file mode 100644 index ff05bf8d9..000000000 --- a/example/util/processing.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import {Processing} from '@schukai/monster/source/util/processing.mjs'; - -let startTime = +new Date(); - -new Processing((url) => { - return fetch(url) -}, (response) => { - // do something with the response - console.log(response.status, +new Date() - startTime) -}, 200, () => { - // this function is called 200 seconds after fetch is received. - console.log('finished', +new Date() - startTime) - return 'done' -}).run('https://monsterjs.org/assets/world.json').then(r => { - console.log(r) - // ↦ "done" -}) diff --git a/source/components/content/copy.mjs b/source/components/content/copy.mjs index 71114f1d1..0bd7e6342 100644 --- a/source/components/content/copy.mjs +++ b/source/components/content/copy.mjs @@ -94,6 +94,9 @@ class Copy extends CustomElement { /** * * @return {Components.Content.Copy + * @fires monster-copy-clicked This event is fired when the copy button is clicked. + * @fires monster-copy-success This event is fired when the copy action is successful. + * @fires monster-copy-error This event is fired when the copy action fails. */ [assembleMethodSymbol]() { super[assembleMethodSymbol](); @@ -244,6 +247,9 @@ function attachResizeObserver() { this[resizeObserverSymbol].observe(this.parentElement); } +/** + * @private + */ function disconnectResizeObserver() { if (this[resizeObserverSymbol] instanceof ResizeObserver) { this[resizeObserverSymbol].disconnect(); @@ -324,9 +330,6 @@ function updatePopper() { /** * @private * @return {initEventHandler} - * @fires monster-copy-clicked - * @fires monster-copy-success - * @fires monster-copy-error */ function initEventHandler() { const self = this; diff --git a/source/components/state/log.mjs b/source/components/state/log.mjs index cae22b4ca..a1f257663 100644 --- a/source/components/state/log.mjs +++ b/source/components/state/log.mjs @@ -38,47 +38,11 @@ const logElementSymbol = Symbol("logElement"); */ const emptyStateElementSymbol = Symbol("emptyStateElement"); -/** - * Log is a control to show a log message. - * - * <img src="./images/log.png"> - * - * Dependencies: the system uses functions of the [monsterjs](https://monsterjs.org/) library - * - * You can create this control either by specifying the HTML tag <monster-state />` directly in the HTML or using - * Javascript via the `document.createElement('monster-state');` method. - * - * ```html - * <monster-log></monster-log> - * ``` - * - * Or you can create this CustomControl directly in Javascript: - * - * ```js - * import {Log} from '@schukai/component-state/source/log.js'; - * document.createElement('monster-log'); - * ``` - * - * @externalExample ../../../example/components/state/log.mjs - * @startuml log.png - * skinparam monochrome true - * skinparam shadowing false - * HTMLElement <|-- CustomElement - * CustomElement <|-- Log - * @enduml - * - * @copyright schukai GmbH - * @memberOf Monster.Components.State - * @summary Log is a control to show a log message. - */ - /** * A Log component * * @fragments /fragments/components/layout/collapse/ * - * @example /examples/components/layout/collapse-simple - * * @since 3.74.0 * @copyright schukai GmbH * @summary A Log component to show a log message. diff --git a/source/constraints/andoperator.mjs b/source/constraints/andoperator.mjs index 5c6d584b2..558072238 100644 --- a/source/constraints/andoperator.mjs +++ b/source/constraints/andoperator.mjs @@ -23,16 +23,16 @@ export { AndOperator }; * * The AndOperator is used to link several constraints. The constraint is fulfilled if all constraints of the operators are fulfilled. * - * @externalExample ../../example/constraints/andoperator.mjs + * @example /examples/libraries/constraints/andoperator/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A and operator constraint */ class AndOperator extends AbstractOperator { /** - * this method return a promise containing the result of the check. + * This method returns a promise containing the result of the check. * * @param {*} value * @return {Promise} diff --git a/source/constraints/invalid.mjs b/source/constraints/invalid.mjs index d48adecef..5f7b3a348 100644 --- a/source/constraints/invalid.mjs +++ b/source/constraints/invalid.mjs @@ -23,16 +23,16 @@ export { Invalid }; * * The invalid constraint allows an always invalid query to be performed. this constraint is mainly intended for testing. * - * @externalExample ../../example/constraints/invalid.mjs + * @example /examples/libraries/constraints/invalid/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A constraint that always invalid */ class Invalid extends AbstractConstraint { /** - * this method return a rejected promise + * this method returns a rejected promise * * @param {*} value * @return {Promise} diff --git a/source/constraints/isarray.mjs b/source/constraints/isarray.mjs index 6230a55cb..ba682b55f 100644 --- a/source/constraints/isarray.mjs +++ b/source/constraints/isarray.mjs @@ -22,16 +22,16 @@ export { IsArray }; * * The uniform API of the constraints allows chains to be formed. * - * @externalExample ../../example/constraints/isarray.mjs + * @example /examples/libraries/constraints/isarray/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A constraint to check if a value is an array */ class IsArray extends AbstractConstraint { /** - * this method return a promise containing the result of the check. + * this method returns a promise containing the result of the check. * * @param {*} value * @return {Promise} diff --git a/source/constraints/isobject.mjs b/source/constraints/isobject.mjs index 6cca890a4..0746e3907 100644 --- a/source/constraints/isobject.mjs +++ b/source/constraints/isobject.mjs @@ -22,16 +22,16 @@ export { IsObject }; * * The uniform API of the constraints allows chains to be formed. * - * @externalExample ../../example/constraints/isobject.mjs + * @example /examples/libraries/constraints/isobject/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A constraint to check if a value is an object */ class IsObject extends AbstractConstraint { /** - * this method return a promise containing the result of the check. + * this method returns a promise containing the result of the check. * * @param {*} value * @return {Promise} diff --git a/source/constraints/oroperator.mjs b/source/constraints/oroperator.mjs index d92e65ef5..babc44d46 100644 --- a/source/constraints/oroperator.mjs +++ b/source/constraints/oroperator.mjs @@ -23,16 +23,16 @@ export { OrOperator }; * * The OrOperator is used to link several constraints. The constraint is fulfilled if one of the constraints is fulfilled. * - * @externalExample ../../example/constraints/oroperator.mjs + * @example /examples/libraries/constraints/oroperator/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A or operator */ class OrOperator extends AbstractOperator { /** - * this method return a promise containing the result of the check. + * this method returns a promise containing the result of the check. * * @param {*} value * @return {Promise} diff --git a/source/constraints/valid.mjs b/source/constraints/valid.mjs index 2dd5cac4b..ebb51bebc 100644 --- a/source/constraints/valid.mjs +++ b/source/constraints/valid.mjs @@ -23,11 +23,11 @@ export { Valid }; * * The valid constraint allows an always valid query to be performed. this constraint is mainly intended for testing. * - * @externalExample ../../example/constraints/valid.mjs + * @example /examples/libraries/constraints/valid/ A simple example + * * @license AGPLv3 * @since 1.3.0 * @copyright schukai GmbH - * @memberOf Monster.Constraints * @summary A constraint that always valid */ class Valid extends AbstractConstraint { diff --git a/source/data/buildmap.mjs b/source/data/buildmap.mjs index c40d65f10..550ff2cc6 100644 --- a/source/data/buildmap.mjs +++ b/source/data/buildmap.mjs @@ -33,9 +33,10 @@ const PARENT = "^"; * The templates determine the appearance of the keys and the value of the map. Either a single value * id can be taken or a composite key ${id} ${name} can be used. * - * If you want to access values of the parent data set, you have to use the ^ character, for example ${id} ${^.name}. + * If you want to access the values of the parent data set, you have to use the ^ character, for example, ${id} ${^.name}. * * @externalExample ../../example/data/buildmap.mjs + * * @param {*} subject - The data object from which the map will be created * @param {string|Monster.Data~exampleSelectorCallback} selector - The path to the data object, or a callback that returns a map. * @param {string} [valueTemplate] - A template for the value of the map. diff --git a/source/dom/updater.mjs b/source/dom/updater.mjs index 350d5e4bc..86cc2535b 100644 --- a/source/dom/updater.mjs +++ b/source/dom/updater.mjs @@ -54,11 +54,11 @@ export { Updater, addObjectWithUpdaterToElement }; * to other values as well, you have to insert the attribute `data-monster-select-this`. This should be * done with care, as it can reduce performance. * - * @externalExample ../../example/dom/updater.mjs + * @example /examples/libraries/dom/updater/simple/ Simple example + * * @license AGPLv3 * @since 1.8.0 * @copyright schukai GmbH - * @memberOf Monster.DOM * @throws {Error} the value is not iterable * @throws {Error} pipes are not allowed when cloning a node. * @throws {Error} no template was found with the specified key. @@ -149,7 +149,7 @@ class Updater extends Base { /** * With this method, the eventlisteners are hooked in and the magic begins. * - * ``` + * ```js * updater.run().then(() => { * updater.enableEventProcessing(); * }); @@ -198,7 +198,7 @@ class Updater extends Base { * The run method must be called for the update to start working. * The method ensures that changes are detected. * - * ``` + * ```js * updater.run().then(() => { * updater.enableEventProcessing(); * }); @@ -317,7 +317,6 @@ function getControlEventHandler() { * @throws {Error} the bind argument must start as a value with a path * @param {HTMLElement} element * @return void - * @memberOf Monster.DOM * @private */ function retrieveAndSetValue(element) { diff --git a/source/i18n/providers/embed.mjs b/source/i18n/providers/embed.mjs index b08f1dfae..558f5d283 100644 --- a/source/i18n/providers/embed.mjs +++ b/source/i18n/providers/embed.mjs @@ -30,9 +30,7 @@ export { Embed }; * @license AGPLv3 * @since 1.13.0 * @copyright schukai GmbH - * @memberOf Monster.I18n.Providers * @see {@link https://datatracker.ietf.org/doc/html/rfc3066} - * @tutorial i18n-locale-and-formatter */ class Embed extends Provider { /** @@ -148,7 +146,7 @@ class Embed extends Provider { * `script[data-monster-role=translations]` is searched for and the translations are assigned to the element. * * @param element - * @return {Promise<Awaited<unknown>[]>} + * @returns {Promise<Awaited<*[]>>|Promise<Awaited<unknown>[]>} */ static assignTranslationsToElement(element) { const d = getDocument(); diff --git a/source/types/basewithoptions.mjs b/source/types/basewithoptions.mjs index 0aefe87e9..7c0da30e8 100644 --- a/source/types/basewithoptions.mjs +++ b/source/types/basewithoptions.mjs @@ -26,13 +26,12 @@ export { BaseWithOptions }; * This class is actually only used as a base class. * * Classes that require the possibility of options can be derived directly from this class. - * Derived classes almost always override the `defaul` getter with their own values. + * Derived classes almost always override the `default` getter with their own values. * - * @externalExample ../../example/types/basewithoptions.mjs * @license AGPLv3 * @since 1.13.0 * @copyright schukai GmbH - * @deprecated since 3.15.0 use `BaseWithOptions` instead of `BaseWithOptions` + * @deprecated since 3.15.0 */ class BaseWithOptions extends Base { /** @@ -51,7 +50,7 @@ class BaseWithOptions extends Base { /** * This getter provides the options. Derived classes overwrite - * this getter with their own values. It is good karma to always include + * this getter with their own values. It is a good karma to always include * the values from the parent class. * * ```javascript diff --git a/source/types/is.mjs b/source/types/is.mjs index 0b91dab05..1fc67ae6e 100644 --- a/source/types/is.mjs +++ b/source/types/is.mjs @@ -38,7 +38,6 @@ export { * @license AGPLv3 * @since 1.2.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isIterable(value) { if (value === undefined) return false; @@ -57,7 +56,6 @@ function isIterable(value) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isPrimitive(value) { var type; @@ -91,7 +89,6 @@ function isPrimitive(value) { * @license AGPLv3 * @since 1.9.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isSymbol(value) { return "symbol" === typeof value ? true : false; @@ -108,7 +105,6 @@ function isSymbol(value) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isBoolean(value) { if (value === true || value === false) { @@ -129,7 +125,6 @@ function isBoolean(value) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isString(value) { if (value === undefined || typeof value !== "string") { @@ -149,7 +144,6 @@ function isString(value) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isObject(value) { if (isArray(value)) return false; @@ -174,7 +168,6 @@ function isObject(value) { * @license AGPLv3 * @since 1.5.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isInstance(value, instance) { if (!isObject(value)) return false; @@ -194,7 +187,6 @@ function isInstance(value, instance) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types * @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray */ function isArray(value) { @@ -212,7 +204,6 @@ function isArray(value) { * @license AGPLv3 * @since 1.0.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isFunction(value) { if (isArray(value)) return false; @@ -236,7 +227,6 @@ function isFunction(value) { * @license AGPLv3 * @since 1.4.0 * @copyright schukai GmbH - * @memberOf Monster.Types */ function isInteger(value) { return Number.isInteger(value); diff --git a/source/util/comparator.mjs b/source/util/comparator.mjs index f37d3f1c2..d138c174f 100644 --- a/source/util/comparator.mjs +++ b/source/util/comparator.mjs @@ -38,10 +38,9 @@ export { Comparator }; * }).equal({v: 2}, {v: 2}); // ↦ true * ``` * - * @externalExample ../../example/util/comparator.mjs + * @example /example/comparator/simple/ Simple example * @license AGPLv3 * @since 1.3.0 - * @memberOf Monster.Util */ class Comparator extends Base { /** diff --git a/source/util/deadmansswitch.mjs b/source/util/deadmansswitch.mjs index 151183aa7..5447bddf0 100644 --- a/source/util/deadmansswitch.mjs +++ b/source/util/deadmansswitch.mjs @@ -21,13 +21,13 @@ import { validateFunction, validateInteger } from "../types/validate.mjs"; export { DeadMansSwitch }; /** - * The dead man's switch allows to set a timer which can be reset again and again within a defined period of time. + * The dead man's switch allows setting a timer which can be reset again + * and again within a defined period of time. * - * @externalExample ../../example/util/deadmansswitch.mjs + * @example /example/util/deadmansswitch/simple/ Simple example * @copyright schukai GmbH * @license AGPLv3 * @since 1.29.0 - * @memberOf Monster.Util * @summary Class to be able to execute function chains */ class DeadMansSwitch extends Base { @@ -46,8 +46,10 @@ class DeadMansSwitch extends Base { } /** - * - * @param {Integer|undefined} [delay] + * @param delay + * @returns {DeadMansSwitch} + * @throws {Error} has already run + * @throws {Error} unsupported argument */ touch(delay) { if (this[internalSymbol]["isAlreadyRun"] === true) { diff --git a/source/util/processing.mjs b/source/util/processing.mjs index a70dc941c..19dc49839 100644 --- a/source/util/processing.mjs +++ b/source/util/processing.mjs @@ -33,12 +33,12 @@ export { Processing }; * So the execution time is timeout1+timeout1+timeout1+timeout2 * * The result of `run()` is a promise. - * - * @externalExample ../../example/util/processing.mjs + * + * @example /examples/libraries/util/processing/simple/ A simple example + * * @copyright schukai GmbH * @license AGPLv3 * @since 1.21.0 - * @memberOf Monster.Util * @summary Class to be able to execute function chains */ class Processing extends Base { -- GitLab