Regarding comment-based type syntax described in https://flow.org/en/docs/types/comments/#comment-types-syntax-a-classtoc-idtoc-comment-types-syntax-hreftoc-comment-types-syntaxa
There does not seem to be a way to import type using comment syntax. That means when I use comment type syntax to annotate a type defined in another file I either have to use Flow import type syntax - negating the whole purpose of comment types - or.. well, there does not seem to be an "or".
You can definitely import types using the comment syntax:
// @flow
/*::
import type { Foo } from './other-file'
*/
And you can export types the same way:
// @flow
/*::
export type Foo = {| bar: string |}
*/
When I try this, I get 'Cannot resolve module'.
Most helpful comment
You can definitely import types using the comment syntax:
And you can export types the same way: