Created
May 11, 2025 20:50
-
-
Save ivan/33b34c35546ac151a51a8933da88a44d 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
function sum<T extends number | bigint>(a: T, b: T): T extends number ? number : bigint { | |
// @ts-expect-error | |
return a + b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment