Skip to content

Nested Global fields causes error in Type Gen #92

Open
@timothyjoh

Description

@timothyjoh

all_simple_fields.json

I have Global fields for a lot of simple types in our system, Rich-text, Image, Video, etc.

The attached Global field combines them all into a singular Modular Block. But the TSGEN plugin for the csdx CLI spits out an error:

›   Error: Something went wrong, ';' expected. (91:7)
 ›     89 | body?: string; }
 ›     90 | image: /** Intro */
 ›   > 91 | intro?: string;
 ›        |       ^
 ›     92 | /** Image File */
 ›     93 | image_file?: File | null;
 ›     94 | /** Image Alt Text */
 ELIFECYCLE  Command failed with exit code 1.

Which I can see why it complains, does it try to validate the TS and then not write the file? But yea this may not be "good practice" to have Global Field Inception, but please let me know

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions