Files
test-repo/tests/flow/iterable/map.js
T
Christopher Chedeau 3375cfe605 Move tests around (#454)
* new_tests

* move_all_clobbered_tests

* remove all the tests that no longer exist

* re-run flow tests

* Move all the flow tests to tests/flow and prettier to tests/

* Move prettier tests to their own folders

* Add jsfmt files

* run prettier snapshot tests
2017-01-24 14:35:37 -08:00

16 lines
373 B
JavaScript

/* @flow */
function mapTest1(map: Map<string, number>): Iterable<[string, number]> {
return map;
}
function mapTest2<K, V>(map: Map<K, V>): Iterable<[K, V]> {
return map;
};
function mapTest3(map: Map<string, number>): Iterable<*> {
return map;
}
// Error - Map is an Iterable<[K, V]>
function mapTest4(map: Map<number, string>): Iterable<string> {
return map;
}