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

187
Views
Escriba 'cadena[] | undefined' no se puede asignar al tipo 'cadena | indefinido'

Soy nuevo en mecanografiar. Me enfrento a algunos mientras declaro Props en mecanografiado de la siguiente manera:

 Types of property 'd' are incompatible. Type 'string[] | undefined' is not assignable to type 'string | undefined'.

Tengo un xyzProps que contiene algún tipo de picadura y uno es una cadena [] como se indica a continuación:

 const d1: string[] = []; type xyzProps = { a: string; b: string; c: string; d: typeof d1; };

Cuando intento usar los accesorios anteriores de la siguiente manera, aparece un error

 export type abcPageProps = RouteComponentProps<Partial<xyzProps>> & ReduxProps;

Alguna idea de por qué me da este error O alguna solución para ello.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

puedes intentar

 type xyzProps = { a: string; b: string; c: string; d: string[]; }; export type abcPageProps = RouteComponentProps<xyzProps> & ReduxProps;
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!