我有一个名为interfaces
的文件夹:
在finale.js
中,我有:
// @flow
type finaleContext = {
instance: string
}
export type { finaleContext }
我希望它能够被流程接收。在 .flowconfig
中,我尝试了:
[libs]
./interfaces/*.js
它仍然提示:无法解析名称 FinaleContext。
那么我怎样才能将所有这些接口(interface)作为定义包含进来呢?
最佳答案
Each line in the
[libs]
section is a path to the library file or directory which you would like to include. These paths can be relative to the project root directory or absolute. Including a directory recursively includes all the files under that directory as library files.
https://flow.org/en/docs/config/libs/
所以,我认为你可以写
[libs]
interfaces
关于javascript - 如何让 .flowconfig 从文件夹中读取类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57896797/