Skip to content

method return type is optional #42

@gsouf

Description

@gsouf

In the generated typescript client, for a method returning a User the generated return type comes as below:

export interface GetUserReturn {
  user?: User  
}

As you can see the user is optional, but I never made it optional. It's actual the extact expected return value when the method does not fail.
When it fails, it throws an error, the return return value is not created. I think the correct behavior would be to make it non-optional:

export interface GetUserReturn {
  user: User  
}

Thoughts?

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