Revert "add generics for Scene and its config key"

This reverts commit a1cf6e4456.
This commit is contained in:
Chnapy 2020-01-03 12:37:50 +01:00
parent a1cf6e4456
commit 094e322ace
3 changed files with 6 additions and 11 deletions

View file

@ -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.<K>} - [config]
*
* @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.
*/

View file

@ -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.

10
types/phaser.d.ts vendored
View file

@ -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<K extends string = string> = {
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<K extends string = string> {
class Scene {
/**
*
* @param config Scene specific configuration settings.
*/
constructor(config: K | Phaser.Types.Scenes.SettingsConfig<K>);
constructor(config: string | Phaser.Types.Scenes.SettingsConfig);
/**
* The Scene Systems. You must never overwrite this property, or all hell will break lose.