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

77
Views
¿Cómo hago un alias de tipo genérico?

Digamos que tengo un nombre de tipo genérico muy largo dentro de un paquete incluido llamado:

 MySuperLongGenericTypeNameWithCarrots<SomeType, SomeType>

Ahora, me gustaría crear un alias para acortar el nombre, como:

 MyShortname<SomeType, SomeType>

Intenté lo siguiente, pero no logré descubrir cómo hacerlo:

 type MyShortname<SomeType, SomeType> = MySuperLongGenericTypeNameWithCarrots<SomeType, SomeType>;

¡Cualquier idea sería apreciada!

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

0

Prueba esto:

 type MyShortname<SomeTypeA, SomeTypeB extends keyof SomeTypeA> = MySuperLongGenericTypeNameWithCarrots<SomeTypeA, SomeTypeB>;
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!