TypeScript/tests/cases/compiler/mapOnTupleTypes02.ts

9 lines
196 B
TypeScript
Raw Normal View History

2016-09-28 19:58:20 +02:00
// @declaration: true
// @noImplicitAny: true
// @strictNullChecks: true
export type Point = [number, number];
export function increment(point: Point) {
return point.map(d => d + 1);
}