Skip to content

Commit 094e322

Browse files
committed
Revert "add generics for Scene and its config key"
This reverts commit a1cf6e4.
1 parent a1cf6e4 commit 094e322

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

src/scene/Scene.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ var Systems = require('./Systems');
1717
* @memberof Phaser
1818
* @constructor
1919
* @since 3.0.0
20-
*
21-
* @generic {string=string} K
22-
* @genericUse {K | Phaser.Types.Scenes.SettingsConfig.<K>} - [config]
2320
*
2421
* @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.
2522
*/

src/scene/typedefs/SettingsConfig.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
22
* @typedef {object} Phaser.Types.Scenes.SettingsConfig
33
* @since 3.0.0
4-
*
5-
* @generic {string=string} K - [key]
64
*
7-
* @property {K} [key] - The unique key of this Scene. Must be unique within the entire Game instance.
5+
* @property {string} [key] - The unique key of this Scene. Must be unique within the entire Game instance.
86
* @property {boolean} [active=false] - Does the Scene start as active or not? An active Scene updates each step.
97
* @property {boolean} [visible=true] - Does the Scene start as visible or not? A visible Scene renders each step.
108
* @property {(false|Phaser.Types.Loader.FileTypes.PackFileConfig)} [pack=false] - An optional Loader Packfile to be loaded before the Scene begins.

types/phaser.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50758,7 +50758,7 @@ declare namespace Phaser {
5075850758
/**
5075950759
* If provided as an array, the range defined by `start` and `end` will be ignored and these frame numbers will be used.
5076050760
*/
50761-
frames?: boolean | integer[];
50761+
frames?: boolean;
5076250762
};
5076350763

5076450764
type GenerateFrameNumbers = {
@@ -55726,11 +55726,11 @@ declare namespace Phaser {
5572655726
data?: any;
5572755727
};
5572855728

55729-
type SettingsConfig<K extends string = string> = {
55729+
type SettingsConfig = {
5573055730
/**
5573155731
* The unique key of this Scene. Must be unique within the entire Game instance.
5573255732
*/
55733-
key?: K;
55733+
key?: string;
5573455734
/**
5573555735
* Does the Scene start as active or not? An active Scene updates each step.
5573655736
*/
@@ -74723,12 +74723,12 @@ declare namespace Phaser {
7472374723
*
7472474724
* 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()}.
7472574725
*/
74726-
class Scene<K extends string = string> {
74726+
class Scene {
7472774727
/**
7472874728
*
7472974729
* @param config Scene specific configuration settings.
7473074730
*/
74731-
constructor(config: K | Phaser.Types.Scenes.SettingsConfig<K>);
74731+
constructor(config: string | Phaser.Types.Scenes.SettingsConfig);
7473274732

7473374733
/**
7473474734
* The Scene Systems. You must never overwrite this property, or all hell will break lose.

0 commit comments

Comments
 (0)