Created
August 8, 2022 20:38
-
-
Save artalar/2359942d9a19d51608fbaa6fc36e0094 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MyPromise<T> = Promise<Awaited<T>> | |
async function call<T extends () => any>(fn: T): MyPromise<ReturnType<T>> { | |
return fn() | |
} | |
const res = call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => | |
call(() => call(() => call(() => {}))), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment