Skip to content
Snippets Groups Projects
Verified Commit 5811bce5 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: some minor fixes

parent 2cea82d4
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
......@@ -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}
......
......@@ -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}
......
......@@ -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}
......
......@@ -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 {
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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();
......
......@@ -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
......
......@@ -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);
......
......@@ -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 {
/**
......
......@@ -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) {
......
......@@ -34,11 +34,11 @@ export { Processing };
*
* 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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment