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

7 lines
154 B
TypeScript

// @declaration: true
declare function map <T, U > (items: T[], f: (x: T) => U): U[];
var myItems: string[];
var lengths = map(myItems, x => x.length);