Skip to content

'resource' does not exist in type 'Params$Resource$Spreadsheets$Batchupdate'. #1966

@francoisromain

Description

@francoisromain

Environment details

  • OS: Mac Os 10.13.6
  • Node.js version: v13.8.0
  • npm version: 6.13.7
  • googleapis version: 47.0.0

Steps to reproduce

I try to convert this code (from the official docs: https://developers.google.com/sheets/api/guides/batchupdate) to typescript:

gapi.client.sheets.spreadsheets.batchUpdate({
  spreadsheetId: spreadsheetId,
  resource: batchUpdateRequest
})

It makes the following error:

Argument of type '{ spreadsheetId: string; resource: { requests: any; }; }' is not assignable to parameter of type 'Params$Resource$Spreadsheets$Batchupdate'.

Object literal may only specify known properties, and 'resource' does not exist in type 'Params$Resource$Spreadsheets$Batchupdate'.

(Actually here is the file I am trying to convert to ts, where I have this error: https://github.com/MTES-MCT/camino-api/blob/89a8a764177c5efda57a7154b6ffd936f63afee9/src/tools/api-google-spreadsheets/index.js#L22)

what should I do to avoid the error?

Thank you

Metadata

Metadata

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions