// @flow
class Foo {
bar: number;
}
const arr = [new Foo(), new Foo(), new Foo()];
const arr2: [] = arr.map(a => a.bar);
Cannot assign arr.map(...) to arr2 because array type [1] has an unknown number of elements, so is
incompatible with tuple type [2].
src/main/test.js
6│
7│ const arr = [new Foo(), new Foo(), new Foo()];
8│
[2] 9│ const arr2: [] = arr.map(a => a.bar);
10│
/private/tmp/flow/flowlib_1af87bb1/core.js
[1] 248│ map<U>(callbackfn: (value: T, index: number, array: Array<T>) => U, thisArg?: any): Array<U>;