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

195
Views
En Typescript, ¿hay alguna diferencia entre `return x` y `return await x`?

En Typescript, ¿hay alguna diferencia entre return x y return await x ?

Supongamos que tenemos:

 async function func(): Promise<void> { } async function option1(): Promise<void> { return await func(); } async function option2(): Promise<void> { return func(); }

Sé que al apuntar a ES5, option1() requerirá más código.

En ES2015 y ES2016 tendrá una palabra clave de yield adicional.

En ES2017, aparecerá tal cual, con la await adicional.

  1. ¿Hay alguna diferencia lógica entre las dos versiones?
  2. ¿Pueden comportarse de manera diferente de alguna manera cuando se ejecutan?
  3. ¿Hay alguna diferencia de rendimiento en ES2015? ¿Y en ES2017?
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!