Skip to content

Add support for self-referenced types #55

@mattreddy3

Description

@mattreddy3

Hi,

Thanks as always for maintaining this project! Wanted to ask for an enhancement. We sometimes reference field types across entity definitions (not necessarily referencing a distinct type declaration). For example:

entity MyEntity {
  Field1: String; // We will reference this field
  Field2: Integer;
}

entity TypeRefEntity { 
  Field3: MyEntity:Field1; // Should resolve to `String` as type
}

Here is an example of where this currently fails:
image
The error is _a.includes is not a function since _a is not a string as expected.

I'm using [email protected] - not sure if that is the problem? As a workaroudn I will try to explicitly type these.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions