Skip to content

[Code Editor] esm inheritance #1732

@lucaheft

Description

@lucaheft

With the new esm scripting system inheritance is now supported quite well.
I've played around with it a bit and it seems like the code editor isn't yet fully supporting this.

Here is my sample project:
https://playcanvas.com/project/1466873/overview/inheritance

In this project the following inhertiance is taking place: A -> B -> C

Following problems arise:

  1. If only opening script C the editor can only resolve properties of the class it directly inherits from, but not any further parent classes. this.stringA and this.on do not resolve correctly. This can be fixed by opening script B and A in the editor, the references are then resolved correctly.
  2. Close all scripts open C then open B. Editor fails to resolve the import for script A in script B. Can again be fixed by opening script A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions