From 094e322acef2a969bd1cde680d395336fbfd918a Mon Sep 17 00:00:00 2001 From: Chnapy Date: Fri, 3 Jan 2020 12:37:50 +0100 Subject: [PATCH] Revert "add generics for Scene and its config key" This reverts commit a1cf6e4456e8cbb5dd74487dd720927aa7a13031. --- src/scene/Scene.js | 3 --- src/scene/typedefs/SettingsConfig.js | 4 +--- types/phaser.d.ts | 10 +++++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/scene/Scene.js b/src/scene/Scene.js index d011b3875..0d4a5ba99 100644 --- a/src/scene/Scene.js +++ b/src/scene/Scene.js @@ -17,9 +17,6 @@ var Systems = require('./Systems'); * @memberof Phaser * @constructor * @since 3.0.0 - * - * @generic {string=string} K - * @genericUse {K | Phaser.Types.Scenes.SettingsConfig.} - [config] * * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings. */ diff --git a/src/scene/typedefs/SettingsConfig.js b/src/scene/typedefs/SettingsConfig.js index a77af51d1..1b774fa17 100644 --- a/src/scene/typedefs/SettingsConfig.js +++ b/src/scene/typedefs/SettingsConfig.js @@ -1,10 +1,8 @@ /** * @typedef {object} Phaser.Types.Scenes.SettingsConfig * @since 3.0.0 - * - * @generic {string=string} K - [key] * - * @property {K} [key] - The unique key of this Scene. Must be unique within the entire Game instance. + * @property {string} [key] - The unique key of this Scene. Must be unique within the entire Game instance. * @property {boolean} [active=false] - Does the Scene start as active or not? An active Scene updates each step. * @property {boolean} [visible=true] - Does the Scene start as visible or not? A visible Scene renders each step. * @property {(false|Phaser.Types.Loader.FileTypes.PackFileConfig)} [pack=false] - An optional Loader Packfile to be loaded before the Scene begins. diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 1aed73d16..0eb28ba81 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -50758,7 +50758,7 @@ declare namespace Phaser { /** * If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used. */ - frames?: boolean | integer[]; + frames?: boolean; }; type GenerateFrameNumbers = { @@ -55726,11 +55726,11 @@ declare namespace Phaser { data?: any; }; - type SettingsConfig = { + type SettingsConfig = { /** * The unique key of this Scene. Must be unique within the entire Game instance. */ - key?: K; + key?: string; /** * Does the Scene start as active or not? An active Scene updates each step. */ @@ -74723,12 +74723,12 @@ declare namespace Phaser { * * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}. */ - class Scene { + class Scene { /** * * @param config Scene specific configuration settings. */ - constructor(config: K | Phaser.Types.Scenes.SettingsConfig); + constructor(config: string | Phaser.Types.Scenes.SettingsConfig); /** * The Scene Systems. You must never overwrite this property, or all hell will break lose.