Skip to content

TSGen fails when using a Global inside a Global #1976

@danychi

Description

@danychi

Hi there!!

I am trying to use a global field inside a global field and when I try to generate the types using TSGen, contentstack/cli is throwing the following error:

    SyntaxError: Type expected. (150:14)
      148 | {
      149 | /** Version */
    > 150 | _version?:   ;
          |              ^
      151 | /** Icon */
      152 | icon: ("system-alarm" | ...
 ELIFECYCLE  Command failed with exit code 1.

These are the models for the two global fields:
Global Fields Feature.json
Global Fields Icon.json

This is the command I am using for the TSGen:

csdx tsgen -a DELIVERY_TOKEN -o 'models/contentstack.model.ts' --branch=main --include-system-fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions