Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

typescript definition for load() is missing File[] #1104

@simllll

Description

@simllll
  • OS: linux
  • Node.js version: 16.14.0
  • npm version: 8.6.0
  • @google-cloud/bigquery version: 5.12.0

Steps to reproduce

According to the example here, and also by testing and using this already quite some time
https://cloud.google.com/nodejs/docs/reference/bigquery/latest/bigquery/table#_google_cloud_bigquery_Table_load_member_4_

it shuld be possible to use File[] as .load() parameter.

e.g.

const myFiles = [
  gcs.bucket('institutions').file('2011.csv'),
  gcs.bucket('institutions').file('2012.csv')
];

await GoogleBigQueryAdapter.getBigQueryClient()
				.dataset(dataset)
				.table(tableId)
				.load(myFiles, metadata)

But doing so results into a TS error:
TS2769: No overload matches this call.   The last overload gave the following error.     Argument of type 'File | File[]' is not assignable to parameter of type 'string | File'.       Type 'File[]' is not assignable to type 'string | File'.

Because load() has source defined only as source: string | File,.. not as source: string | File | File[]

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/nodejs-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions