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

226
Views
El tipo 'cadena' no se puede asignar al tipo 'ReviewsKeyType' ERROR TS

Recibí este error de TS, ¿alguien puede explicarme qué estoy haciendo mal?

 Type '{ key: string; number: number | undefined; }[]' is not assignable to type 'IReviewsRoute[]'. Type '{ key: string; number: number | undefined; }' is not assignable to type 'IReviewsRoute'. Types of property 'key' are incompatible. Type 'string' is not assignable to type 'ReviewsKeyType'.ts(2322)

Modelo:

 export type ReviewsKeyType = 'ONE' | 'TWO' | 'THREE' | 'FOUR' | 'FIVE'; export interface IReviewsRoute { key: ReviewsKeyType; number: number | undefined; }

Datos

 const ROUTES: IReviewsRoute[] = [ { key: 'ONE', number: 1 }, { key: 'TWO', number: 2 }, { key: 'THREE', number: 3 }, { key: 'FOUR', number: 4 }, { key: 'FIVE', number: 5 } ];

¿Por qué dice que la cadena no se puede asignar para escribir reviewskeytpe? No puse una cuerda en ningún lado

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!