Skip to content

Is there a way to return responseData->bodyType as array of objects #87

Description

@tihobanov

I am trying to return a response as an array of objects, but there is no way to do it.

Desired body type
[ {},{},{} ]

I have tried 

export interface MyTest {
  id: string;
}

export interface Response extends Array<MyTest>{}

Can you advise, please?

Activity

  1. changed the title [-]Array response[/-] [+]Is there a way to return responseData->bodyType as array of objects[/+] on Sep 7, 2022
  2. bfaulk96 commented on Sep 7, 2022

    @bfaulk96
    Collaborator

    You can do

    export interface MyTest {
      id: string;
    }
    
    export type Response = MyTest[];
  3. locked and limited conversation to collaborators on Sep 7, 2022
  4. converted this issue into a discussion #88 on Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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