Skip to content

Commit 37eb938

Browse files
authored
Merge pull request phaserjs#3518 from PaNaVTEC/typescript-definitions
Add KeyboardManager#createCursorKeys typedefs
2 parents b3a20d4 + c08f769 commit 37eb938

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/input/keyboard/KeyboardManager.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,24 @@ var KeyboardManager = new Class({
190190
this.target.removeEventListener('keyup', this.handler);
191191
},
192192

193+
/**
194+
* @typedef {object} CursorKeys
195+
*
196+
* @property {Phaser.Input.Keyboard.Key} [up] - [description]
197+
* @property {Phaser.Input.Keyboard.Key} [down] - [description]
198+
* @property {Phaser.Input.Keyboard.Key} [left] - [description]
199+
* @property {Phaser.Input.Keyboard.Key} [right] - [description]
200+
* @property {Phaser.Input.Keyboard.Key} [space] - [description]
201+
* @property {Phaser.Input.Keyboard.Key} [shift] - [description]
202+
*/
203+
193204
/**
194205
* Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also space and shift.
195206
*
196207
* @method Phaser.Input.Keyboard.KeyboardManager#createCursorKeys
197208
* @since 3.0.0
198209
*
199-
* @return {object} [description]
210+
* @return {CursorKeys} [description]
200211
*/
201212
createCursorKeys: function ()
202213
{

0 commit comments

Comments
 (0)