Skip to content

Commit 1f66a82

Browse files
committed
feat(flow): Add more tests for Record constructor
1 parent f0addf8 commit 1f66a82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

type-definitions/tests/record.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ let originNew = new PointNew();
1818
let geo = GeoPoint({lat:34});
1919
// $ExpectError
2020
const mistake = Point2({x:'string'});
21+
// $ExpectError - 'new Record' instantiated with invalid type
22+
const mistakeNewRecord = PointNew({x:'string'});
23+
// $ExpectError - 'Record' instantiated with invalid type using 'new'
24+
const mistakeNewInstance = new Point2({x:'string'});
2125
origin3 = GeoPoint({lat:34})
2226
geo = Point3({});
2327

0 commit comments

Comments
 (0)