Files
tsgo/testdata/baselines/reference/submodule/compiler/genericFunctions2.js

21 lines
485 B
TypeScript

//// [tests/cases/compiler/genericFunctions2.ts] ////
//// [genericFunctions2.ts]
declare function map <T, U > (items: T[], f: (x: T) => U): U[];
var myItems: string[];
var lengths = map(myItems, x => x.length);
//// [genericFunctions2.js]
"use strict";
var myItems;
var lengths = map(myItems, x => x.length);
//// [genericFunctions2.d.ts]
declare function map<T, U>(items: T[], f: (x: T) => U): U[];
declare var myItems: string[];
declare var lengths: number[];