Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

137
Views
Use ConstructorParameters para crear una utilidad para varios métodos estáticos de la API de JavaScript

Estoy leyendo esta pregunta y respuesta , tratando de entender por qué recibo el mismo error, incluso si he hecho casi lo mismo.

Mi código original.

 /** * Shortcut for `Array.from()` static method. * @param {...any[]} args array-like value * @returns {Array} */ const ArrayFrom = (...args) => Array.from(...args); // >>ERROR here export default ArrayFrom;
 A spread argument must either have a tuple type or be passed to a rest parameter.ts(2556)

Ahora, después de definir con ConstructorParameters

 /** * Shortcut for `Array.from()` static method. * @param {ConstructorParameters<typeof Array>} args array-like value * @returns {Array} */ const ArrayFrom = (...args) => Array.from(...args); // >>SAME ERROR here export default ArrayFrom;

Me sale el mismo error, en la misma expresión. ¿Alguien puede explicar por favor?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!