Dan Vanderkam
1 min readDec 6, 2016

--

You’ve also switched from an arrow function to a function statement here. The fairer comparison is to:

const identity = <T>(arg: T) => arg;

It’s still “noisier,” but only by a few characters vs. the untyped version.

--

--

Dan Vanderkam
Dan Vanderkam

Written by Dan Vanderkam

Software Developer @sidewalklabs, author of Effective TypeScript

Responses (2)