Browse Source

Marked some arguments as optional. Fixes #316.

Piotrek Koszuliński 9 years ago
parent
commit
29eaa2e903

+ 2 - 2
packages/ckeditor5-engine/src/treemodel/element.js

@@ -20,8 +20,8 @@ export default class Element extends Node {
 	 * Creates a tree data model element.
 	 *
 	 * @param {String} name Node name.
-	 * @param {Iterable} attrs Iterable collection of attributes.
-	 * @param {engine.treeModel.NodeSet} children List of nodes to be inserted.
+	 * @param {Iterable} [attrs] Iterable collection of attributes.
+	 * @param {engine.treeModel.NodeSet} [children] List of nodes to be inserted.
 	 * into created element. List of nodes can be of any type accepted by the {@link engine.treeModel.NodeList} constructor.
 	 */
 	constructor( name, attrs, children ) {

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/node.js

@@ -20,8 +20,8 @@ export default class Node {
 	 *
 	 * This is an abstract class, so this constructor should not be used directly.
 	 *
-	 * @param {Iterable|Object} attrs Iterable collection of attributes.
 	 * @abstract
+	 * @param {Iterable|Object} [attrs] Iterable collection of attributes.
 	 */
 	constructor( attrs ) {
 		/**

+ 1 - 0
packages/ckeditor5-engine/src/treemodel/position.js

@@ -32,6 +32,7 @@ export default class Position {
 			 */
 			throw new CKEditorError( 'position-root-invalid: Position root invalid.' );
 		}
+
 		/**
 		 * Root element for the position path.
 		 *

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/text.js

@@ -20,7 +20,7 @@ export default class Text {
 	 * Creates a text with attributes.
 	 *
 	 * @param {String} text Described text.
-	 * @param {Iterable|Object} attrs Iterable collection of attributes.
+	 * @param {Iterable|Object} [attrs] Iterable collection of attributes.
 	 */
 	constructor( text, attrs ) {
 		/**