nodejs-bigquery icon indicating copy to clipboard operation
nodejs-bigquery copied to clipboard

Types for getDatasets methods missing projectId parameter

Open MasterOdin opened this issue 3 years ago • 0 comments

When using TS and passing in a projectId to the getDatasets or getDatasetsStream functions, I get a type error about projectId not being found in GetDatasetsOptions, however I do get back the datasets for the project I specify. It would be nice for this to be not a TS error. Not sure if there's anything more involved here than adding projectId?: string to bigquery.datasets.IListParams?

Environment details

  • OS: macOS 12.4
  • Node.js version: 16.15.0
  • npm version: 8.5.5
  • @google-cloud/bigquery version: 6.0.0

Steps to reproduce

import { BigQuery } from '@google-cloud/bigquery';
const client = new BigQuery(/* credentials */);
const [datasets] = client.getDatasets({ projectId: 'bigquery-public-data' });

MasterOdin avatar Jun 16 '22 05:06 MasterOdin