在库定义文件中导入(flow-typed / lib.js)似乎并不合适。
flow-typed
中的目录结构:
flow-typed
| - lib.js
| - some-types.js
什么不起作用:
// in flow-typed/lib.js
import type {SomeTypes} from './some-types'
// use SomeTypes
// SomeTypes doesn't type check and silently fails
什么有效:
// in flow-typed/lib.js
type SomeTypes = {} // literally copy paste from some-type
// use SomeTypes
// works now