Shamoon
Shamoon

Reputation: 43521

How can I have .flowconfig read types from a folder?

I have a folder called interfaces:

enter image description here

In finale.js, I have:

// @flow 
type finaleContext = {
    instance: string
}

export type { finaleContext }

I want this to be picked up by flow. In .flowconfig, I tried:

[libs]
./interfaces/*.js

And it still complains: Cannot resolve name finaleContext.

So how can I include all of these interfaces as definitions?

Upvotes: 0

Views: 122

Answers (1)

user11307804
user11307804

Reputation: 828

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/

So, I think you can just write

[libs]
interfaces

Upvotes: 1

Related Questions