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

177
Views
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 answers
Answer question

0

Use quotes, as you would in JavaScript objects:

type MyObject = {
  "1stXxx"?: string;
};
about 4 years ago · Juan Pablo Isaza Report
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!