DEV Community

Discussion on: Create Promises with Timeout Error in Typescript

Collapse
 
carlo318 profile image
carlo318

Hi Nikos,
thanks for sharing this "trick".
I've just noticed a little imperfection in the full teoric example:
instead of: reject(timeout);
it should be: reject(timeoutError);

or am I wrong?
Thankyou again!
Carlo

Collapse
 
nikosanif profile image
Nikos Anifantis

Great catch! You are right! Although I have implemented right at Stackblitz, there is a typo in this article.