Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the return type from IAM method promises should be an array #870

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ export class KeyManagementServiceClient {
IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.Policy> {
):Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.getIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -2712,7 +2712,7 @@ export class KeyManagementServiceClient {
IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.Policy> {
):Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.setIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -2761,7 +2761,7 @@ export class KeyManagementServiceClient {
IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse> {
):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> {
return this.iamClient.testIamPermissions(request, options, callback);
}

Expand Down
6 changes: 3 additions & 3 deletions templates/typescript_gapic/_iam.njk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.Policy> {
):Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.getIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -93,7 +93,7 @@
IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.Policy> {
):Promise<[IamProtos.google.iam.v1.Policy]> {
return this.iamClient.setIamPolicy(request, options, callback);
}

Expand Down Expand Up @@ -142,7 +142,7 @@
IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined,
{} | null | undefined
>
):Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse> {
):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> {
return this.iamClient.testIamPermissions(request, options, callback);
}
{%- endmacro -%}