From c08f76935150176ed846323c8007ed4f208c68bd Mon Sep 17 00:00:00 2001 From: Christian Panadero Date: Fri, 6 Apr 2018 18:17:58 +0100 Subject: [PATCH] Add keyboardManaged#createCursorKeys typedefs --- src/input/keyboard/KeyboardManager.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/input/keyboard/KeyboardManager.js b/src/input/keyboard/KeyboardManager.js index 28e6d35b7..33fe89360 100644 --- a/src/input/keyboard/KeyboardManager.js +++ b/src/input/keyboard/KeyboardManager.js @@ -190,13 +190,24 @@ var KeyboardManager = new Class({ this.target.removeEventListener('keyup', this.handler); }, + /** + * @typedef {object} CursorKeys + * + * @property {Phaser.Input.Keyboard.Key} [up] - [description] + * @property {Phaser.Input.Keyboard.Key} [down] - [description] + * @property {Phaser.Input.Keyboard.Key} [left] - [description] + * @property {Phaser.Input.Keyboard.Key} [right] - [description] + * @property {Phaser.Input.Keyboard.Key} [space] - [description] + * @property {Phaser.Input.Keyboard.Key} [shift] - [description] + */ + /** * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also space and shift. * * @method Phaser.Input.Keyboard.KeyboardManager#createCursorKeys * @since 3.0.0 * - * @return {object} [description] + * @return {CursorKeys} [description] */ createCursorKeys: function () {