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

179
Vistas
Numeric value in front of type/Object's parameter name

I feel so dumb right now, but...

I am facing an issue where I am trying to fetch data from API but the api has JSON object parameters with numeric values in front of them. Something like {1stxxxx: 'value', 2ndxxx: 'value'}

But that gives me error in eslint:

An identifier or keyword cannot immediately follow a numeric literal.

So the type I have is something like this and the eslint doesn't like the number in front of type parameter names and I do not know, and could not find the eslint rule for that case, to turn it off. And that in ReactNative gives the above unavoidable error:

type MyObject = {
  1stXxx?: string;
};

What would be my options? Any help is much appreciated!

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

0

Use quotes, as you would in JavaScript objects:

type MyObject = {
  "1stXxx"?: string;
};
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