浏览代码

Merge branch 'docs'. Closes #151.

Thanks to @denisname!
Piotrek Koszuliński 7 年之前
父节点
当前提交
cecc6618ea

+ 1 - 0
packages/ckeditor5-core/src/commandcollection.js

@@ -50,6 +50,7 @@ export default class CommandCollection {
 	 * Executes a command.
 	 *
 	 * @param {String} commandName The name of the command.
+	 * @param {*} [...commandParams] Command parameters.
 	 */
 	execute( commandName, ...args ) {
 		const command = this.get( commandName );

+ 1 - 1
packages/ckeditor5-core/src/editor/editor.js

@@ -48,7 +48,7 @@ export default class Editor {
 	 *
 	 * Usually, not to be used directly. See the static {@link module:core/editor/editor~Editor.create `create()`} method.
 	 *
-	 * @param {Object} config The editor config.
+	 * @param {Object} [config] The editor config.
 	 */
 	constructor( config ) {
 		const availablePlugins = this.constructor.builtinPlugins;

+ 2 - 2
packages/ckeditor5-core/src/pendingactions.js

@@ -122,9 +122,9 @@ export default class PendingActions extends Plugin {
 	}
 
 	/**
-	 * Returns the first action from the list.
+	 * Returns the first action from the list or null when list is empty
 	 *
-	 * returns {Object} The pending action object.
+	 * returns {Object|null} The pending action object.
 	 */
 	get first() {
 		return this._actions.get( 0 );

+ 2 - 0
packages/ckeditor5-core/tests/pendingactions.js

@@ -116,6 +116,8 @@ describe( 'PendingActions', () => {
 
 	describe( 'first', () => {
 		it( 'should return first pending action from the list', () => {
+			expect( pendingActions.first ).to.be.null;
+
 			const action = pendingActions.add( 'Action 1' );
 
 			pendingActions.add( 'Action 2' );