Преглед изворни кода

Docs: fixed return types and default export tags.

Maciek пре 9 година
родитељ
комит
f63d64be64

+ 5 - 1
packages/ckeditor5-utils/src/comparearrays.js

@@ -21,7 +21,7 @@
  *
  * @param {Array} a Array that is compared.
  * @param {Array} b Array to compare with.
- * @returns {ArrayRelation} How array `a` is related to `b`.
+ * @returns {module:utils/arrayrelation~ArrayRelation} How array `a` is related to `b`.
  */
 export default function compareArrays( a, b ) {
 	const minLen = Math.min( a.length, b.length );
@@ -45,3 +45,7 @@ export default function compareArrays( a, b ) {
 		return 'extension';
 	}
 }
+
+/**
+ * @typedef {'extension'|'same'|'prefix'} module:utils/arrayrelation~ArrayRelation
+ */

+ 1 - 1
packages/ckeditor5-utils/src/dom/emittermixin.js

@@ -106,7 +106,7 @@ const DomEmitterMixin = extend( {}, EmitterMixin, {
 	 *
 	 * @param {Node} node DOM Node of the ProxyEmitter.
 	 * @method module:utils/dom/emittermixin~EmitterMixin#_getProxyEmitter
-	 * @return {ProxyEmitter} ProxyEmitter instance or null.
+	 * @return {module:utils/dom/emittermixin~ProxyEmitter} ProxyEmitter instance or null.
 	 */
 	_getProxyEmitter( node ) {
 		let proxy, emitters, emitterInfo;

+ 0 - 1
packages/ckeditor5-utils/src/dom/getdatafromelement.js

@@ -12,7 +12,6 @@
 /**
  * Gets data from a given source element.
  *
- * @method getDataFromElement
  * @param {HTMLElement} el The element from which the data will be retrieved.
  * @returns {String} The data string.
  */

+ 0 - 1
packages/ckeditor5-utils/src/dom/indexof.js

@@ -10,7 +10,6 @@
 /**
  * Returns index of the node in the parent element.
  *
- * @method indexOf
  * @param {Node} node Node which index is tested.
  * @returns {Number} Index of the node in the parent element. Returns 0 if node has no parent.
  */

+ 0 - 1
packages/ckeditor5-utils/src/dom/insertat.js

@@ -10,7 +10,6 @@
 /**
  * Inserts node to the parent at given index.
  *
- * @method insertAt
  * @param {Element} parentElement Parent element.
  * @param {Number} index Insertions index.
  * @param {Node} nodeToInsert Node to insert.

+ 0 - 1
packages/ckeditor5-utils/src/dom/remove.js

@@ -10,7 +10,6 @@
 /**
  * Removes given node from parent.
  *
- * @method remove
  * @param {Node} node Node to remove.
  */
 export default function remove( node ) {

+ 0 - 1
packages/ckeditor5-utils/src/dom/setdatainelement.js

@@ -12,7 +12,6 @@
 /**
  * Sets data in a given element.
  *
- * @method setDataInElement
  * @param {HTMLElement} el The element in which the data will be set.
  * @param {String} data The data string.
  */

+ 1 - 2
packages/ckeditor5-utils/src/dom/tounit.js

@@ -11,9 +11,8 @@
  * Returns a helper function, which adds a desired trailing
  * `unit` to the passed value.
  *
- * @method toUnit
  * @param {String} unit An unit like "px" or "em".
- * @returns {toUnit.helper}
+ * @returns {module:utils/dom/tounit~helper}
  */
 export default function toUnit( unit ) {
 	/**

+ 1 - 1
packages/ckeditor5-utils/src/observablemixin.js

@@ -112,7 +112,7 @@ const ObservableMixin = {
 	 *
 	 * @method #bind
 	 * @param {...String} bindAttrs Observable attributes that will be bound to another observable(s).
-	 * @returns {BindChain}
+	 * @returns {module:utils/observablemixin~BindChain}
 	 */
 	bind( ...bindAttrs ) {
 		if ( !bindAttrs.length || !isStringArray( bindAttrs ) ) {