nodejs-bigquery
nodejs-bigquery copied to clipboard
GetRowsOptions Type Error for startIndex: Expects a string when it should expect a number
Environment details
- OS: macOS 14.4.1
- Node.js version: 20.11
- npm version: 10.2.4
-
@google-cloud/bigquery
version: 7.5.2
Steps to reproduce
- Try to pass
startIndex
as an integer option togetRows
. eg.table.getRows({ startIndex: 31241 })
. - Observe typescript error. Expects a string when this should be a number.
- Passing a number in as "string" allows it to compile.
Expected behaviour
startIndex
should work with an integer. As it is right now I need to convert the integer to a string eg. 31241.toString()
Relevant fixes in the code
https://github.com/googleapis/nodejs-bigquery/blob/74aa1501452c36af7969bb4a46b996485d9ca91b/src/types.d.ts#L5903 https://github.com/googleapis/nodejs-bigquery/blob/74aa1501452c36af7969bb4a46b996485d9ca91b/src/types.d.ts#L6055