googleapis / googleapis/google-cloud-node

Bad Type Definition in runJob Result

Open
#4,449 0 comments 0 reactions 0 assignees View on GitHub
priority: p2 type: bug
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

#### Environment details

- which product (packages/*): `@google-cloud/run`
- OS: macOS 13.4.1
- Node.js version: 18.16.0
- npm version: 9.5.1
- google-cloud-node version: `@google-cloud/run` version 0.6.0

#### Steps to reproduce

```ts
import { v2 } from '@google-cloud/run';

const client = new v2.JobsClient();
const [runJob] = await client.runJob({
name: `the/full/name/for/job`,
});

// This exists in the output, but types disagree.
console.log(` View logs: ${runJob?.metadata?.logUri}`);
```

Error:
![Screenshot 2023-07-25 at 12 47 42 PM](https://github.com/googleapis/google-cloud-node/assets/841216/eaa40374-6d98-4f78-9b64-d43d00f92c8e)

I am working around with a `@ts-ignore`, but that's not ideal.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.