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?
In the generated typescript client, for a method returning a
Userthe generated return type comes as below:As you can see the
useris 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:
Thoughts?