Skip to content

[DOCS] add documentation for ComponentSystemRegistry.list#8086

Open
aidinabedi wants to merge 1 commit into
playcanvas:mainfrom
aidinabedi:fix/component-system-registry-list
Open

[DOCS] add documentation for ComponentSystemRegistry.list#8086
aidinabedi wants to merge 1 commit into
playcanvas:mainfrom
aidinabedi:fix/component-system-registry-list

Conversation

@aidinabedi

Copy link
Copy Markdown
Contributor

Description

This PR adds documentation for property list in ComponentSystemRegistry

Checklist

  • I have read the contributing guidelines
  • My code follows the project's coding standards
  • This PR focuses on a single change

@aidinabedi aidinabedi changed the title [DOCS] Add property list in ComponentSystemRegistry [DOCS] add documentation for ComponentSystemRegistry.list Oct 31, 2025

@mvaligursky mvaligursky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very keen on this, as this suggests the users can get the list, and modify it. I'd be happy with this:

 /**
     * Gets an array of all registered component systems. Returns a shallow copy of the internal
     * array, so modifications to the returned array will not affect the registry.
     *
     * @returns {object[]} A copy of the array of registered component systems.
     */
    getSystems() {
        return this._list.slice();
    }

@willeastcott

Copy link
Copy Markdown
Contributor

Wouldn't something like toArray be a bit more JavaScripty?

@mvaligursky

Copy link
Copy Markdown
Contributor

Sure!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants