facebook / facebook/flow

Module declaration wildcards

Open
#5,101 0 comments 3 reactions 0 assignees View on GitHub
declarations feature request
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

While stubbing out most modules is easy to do by just doing:

```
declare module 'module-name' {
declare module.exports: any;
}
```

Some modules provide _many_ files to import. For example, I use [react-icons](https://github.com/gorangajic/react-icons) which has hundreds of files. It would be nice if a module declaration would work like:

```
declare module 'react-icons/lib/*' {
declare module.exports: any;
}
```

and catch all of the modules under that path.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.