Skip to content

Conversation

sjml
Copy link

@sjml sjml commented Jan 8, 2025

This PR (delete as applicable)

  • Fixes a bug

Describe the changes below:

According to the documentation, the pipeline field of the Config object is:

/**
 * An object mapping WebGL names to WebGLPipeline classes. These should be class constructors, not instances.
 */

At some point the type definition of PipelineConfig was updated to Phaser.Renderer.WebGL.WebGLPipeline[] | {[key: string]: typeof Phaser.Renderer.WebGL.WebGLPipeline}, allowing it to also take an array, but that's an array of instances, not constructors. I'm not sure if allowing instances was intentional, but either way, it should also allow constructors. This PR preserves the old typing but adds an additional option for constructors.

(It looks like passing the constructor works fine, so this is just an omission in the typing.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants