Files
test-repo/tests/flow/objects/conversion.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

20 lines
418 B
JavaScript

/* @flow */
(Object({foo: 'bar'}): {foo: string});
(Object("123"): String);
(Object(123): Number);
(Object(true): Boolean);
(Object(null): {});
(Object(undefined): {});
(Object(void(0)): {});
(Object(undefined): Number); // error
var x = Object(null);
x.foo = "bar";
var y = Object("123");
(y.charAt(0): string);
var z = Object(123); // error (next line makes this not match any signatures)
(z.charAt(0): string);