TypeScript/tests/cases/compiler/inferentialTypingWithFunctionType2.ts
2014-07-12 17:30:19 -07:00

4 lines
86 B
TypeScript

function identity<A>(a: A): A {
return a;
}
var x = [1, 2, 3].map(identity)[0];