Skip to content

Conversation

@shivanee-p
Copy link

Description

This PR is part of a larger effort to update our documentation for method parameters to contain a type link for that type.

Impact

This will update our documentation and add more lines of description for our users.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: datastore Issues related to the googleapis/nodejs-datastore API. labels Feb 10, 2026
@shivanee-p shivanee-p force-pushed the updating-descriptions branch from b365601 to 50cce00 Compare February 11, 2026 00:06
Copy link
Contributor

@danieljbruce danieljbruce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it's a vast improvement over what was already there. Great job!

There are just a few nits that are worth looking at and then this should likely be good to merge. After this PR, we will want to make all code changes are made in the new monorepo at https://github.com/googleapis/google-cloud-node as this repository is currently being deprecated.

* // If the callback is omitted, we'll return a Promise.
* //-
* transaction.commit().then((data) => {
* const apiResponse = data[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First and foremost, I think it is worth it for me to post a link here at https://docs.cloud.google.com/nodejs/docs/reference/datastore/latest/datastore/transaction#_google_cloud_datastore_Transaction_commit_member_1_ to the documentation that is going to change. That way when we update the docs we can easily check what changes were made.

/**
* @param {CallOptions} [gaxOptions] Request configuration options.
* See {@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions CallOptions Docs}.
* @param {CommitCallback} callback The callback function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: callback should probably be [callback].

* @param {object} [gaxOptions] Request configuration options, outlined here:
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions.
* @param {object} [gaxOptions] Request configuration options.
* See {@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions CallOptions Docs}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the * @param {object} [gaxOptions] parameter can be eliminated entirely because its not in the following commit(callback: CommitCallback) signature?

* https://googleapis.github.io/gax-nodejs/global.html#CallOptions.
* @param {object} [gaxOptions] Request configuration options.
* See {@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions CallOptions Docs}.
* @param {function} callback The callback function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function can be replaced with the more specific CommitCallback type.

/**
* @param {CallOptions} [gaxOptionsOrCallback] Request configuration options.
* See {@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions CallOptions Docs}.
* @param cb The callback function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should probably add {CommitCallback} here so that the parameter has a type. Also we should wrap cb in square brackets. ie. [cb].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the googleapis/nodejs-datastore API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants