Last active
December 17, 2021 02:30
-
-
Save akihisa-shimada/a6399efd1e1c8df02d069660cb515119 to your computer and use it in GitHub Desktop.
This file contains 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
interface Lengthwise { | |
length: number; | |
} | |
function loggingIdentity<T>(arg: T): T { | |
console.log(arg.length); | |
// -> Property 'length' does not exist on type 'T'.(2339) | |
return arg; | |
} | |
console.log(loggingIdentity(['hello world'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment