prettier/tests/union_new/test23.js

13 lines
280 B
JavaScript

// @noflow
// nested intersections (see also lib/test23_lib.js)
type NestedObj = { } & { dummy: SomeLibClass };
type Obj = NestedObj & { x: string };
function foo(obj: Obj) {
obj.x; // should be OK
obj.x; // should also be OK (the check above shouldn't affect anything)
}