Skip to content

Question/Feature Request: Generating array types to use generic syntax #414

Closed
@SarahFowler73

Description

@SarahFowler73

I have read through docs and issues, and haven't been able to find out if there's a way to do this.

Current behavior

The tool currently generates array types in data-contracts.ts using the following syntax:

export interface ModuleListResponse {
  modules: {
    description: string;
    title: string;
    version: number;
  }[];
}

Desired behavior

For the purposes of readability and consistency in our codebase, I'd like to generate the type using the generic syntax:

export interface ModuleListResponse {
  modules: Array<{
    description: string;
    title: string;
    version: number;
  }>;
}

Is there a way to accomplish this in the current implementation?

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