Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

103
Vistas
GAS causes `The parameters don't match the method signature` exception when mapping a function to an array

This code doesn't work:

const files = [ 'file-id0', 'file-id1' ].map(DriveApp.getFileById)

with the exception Exception: The parameters (String,number,number[]) don't match the method signature for DriveApp.getFileById.

Although this works fine:

const files = [ 'file-id0', 'file-id1' ].map(id=>DriveApp.getFileById(id))

What's the difference of these codes? I cannot understand why the former doesn't work.

Note that DriveApp#getFileById takes only one argument as described in the document. I feel the exception being weird though.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda