suspend-react icon indicating copy to clipboard operation
suspend-react copied to clipboard

🏷️ use awaited

Open ryuji-1to opened this issue 2 years ago • 5 comments

I have made changes to utilize the built-in Awaited type for handling asynchronous operations.

ryuji-1to avatar Jun 17 '23 22:06 ryuji-1to

wait, typescript can finally do this now? since when?

drcmda avatar Jun 18 '23 15:06 drcmda

For a while now

joshuaellis avatar Jun 18 '23 17:06 joshuaellis

is it propagated enough? safe to merge?

drcmda avatar Jun 18 '23 19:06 drcmda

I apologize for any confusion caused. Since your project is using TypeScript 4.4.4, it is likely that you cannot directly use the Awaited type introduced in TypeScript 4.5. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html

ryuji-1to avatar Jun 18 '23 23:06 ryuji-1to

is it propagated enough? safe to merge?

Depends what version of TS you want to support – I think if we upgrade the TS version then it's not outrageous to do.

joshuaellis avatar Jun 19 '23 06:06 joshuaellis