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

155
Vistas
Source has 5 element(s) but target allows only 0

The typescript show this error:

Source has 5 element(s) but target allows only 0

Test.ts

await Map.createPoint("New York",[[323, 232],
      [123, 233],
      [221, 455],
      [321, 212],
      [122, 253]]);

Map.ts


class Map{
  async createGeofencesTest(city:string,points:[]): Promise<void> {
    await Admin.setGeofenceCity(city); 
    await Admin.Points(points);
    return;
  }
}

what am I doing wrong?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The type [] is an array with 0 elements. You need either number[][] or [number, number][].

number[][] is an array of arrays of numbers.

[number, number][] is an array of [number, number]. [number, number] is an array with exactly two numbers.

about 4 years ago · Juan Pablo Isaza Denunciar
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