# flow-typed **Repository Path**: mirrors_TrySound/flow-typed ## Basic Information - **Project Name**: flow-typed - **Description**: A central repository for Flow library definitions - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2025-12-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Flow Logo [![Travis](https://img.shields.io/travis/flow-typed/flow-typed.svg)](https://travis-ci.org/flow-typed/flow-typed) [![npm](https://img.shields.io/npm/dm/flow-typed.svg)](https://www.npmjs.com/package/flow-typed) [![Join the chat at https://discordapp.com/invite/8ezwRUK](https://img.shields.io/discord/539606376339734558.svg?label=discord&logo=discord&logoColor=white)](https://discordapp.com/invite/8ezwRUK) `flow-typed` is a [repository](https://github.com/flow-typed/flow-typed/tree/master/definitions) of third-party [library interface definitions](https://flow.org/en/docs/libdefs) for use with [Flow](http://flow.org). You can grab definitions directly from this GitHub repo, or you can use the CLI (currently in beta) to install a libdef for a given library: ```bash $ yarn global add flow-typed $ cd /path/to/my/project $ yarn install $ flow-typed install rxjs@5.0.x 'rxjs_v5.0.x.js' installed at /path/to/my/project/flow-typed/npm/rxjs_v5.0.x.js ``` ## Huh? When you start a project with Flow, **you likely want to use some third-party libraries that were *not* written with Flow**. By default, Flow will just ignore these libraries **leaving them untyped**. As a result, Flow can't give errors if you accidentally mis-use the library (nor will it be able to auto-complete the library). To address this, **Flow supports [library definitions](https://flow.org/en/docs/libdefs)** which allow you to describe the interface of a module or library separate from the implementation of that module/library. **The `flow-typed` repo is a collection of high-quality library definitions**, tests to ensure that definitions remain high quality, and tooling to make it as easy as possible to import them into your project. All you have to do when you add one or more new dependencies to your project is run `flow-typed install`. This will search the libdef repo and download all the libdefs that are relevant for your project and install them for you. After that, **simply check them in** and be on your way! ## Getting Started Check out [Importing And Using Type Definitions](https://github.com/flow-typed/flow-typed/wiki/Importing-And-Using-Type-Definitions) in the wiki. It will walk you through using typedefs installed through flow-typed, as well as writing and including your own. ## FAQs Before opening an issue, take a look at the [FAQs](https://github.com/flow-typed/flow-typed/wiki/FAQs). Chances are your question has already been answered! If not, don't hesitate to [open an issue](https://github.com/flow-typed/flow-typed/issues/new). ## How Do I Contribute Library Definitions? Just send a pull request! The wiki on [Contributing Library Definitions](https://github.com/flow-typed/flow-typed/wiki/Contributing-Library-Definitions) details the format of new contributions. Contributions should follow the best practices outline on [CONTRIBUTING.md](https://github.com/flow-typed/flow-typed/blob/master/CONTRIBUTING.md). #### Contributing to the CLI Bugfixes and improvements to the core CLI are welcome. If you'd like to contribute a new feature, consider opening an issue first to discuss it. ## `flow-typed` CLI The `flow-typed` npm package provides a CLI that includes several commands for working with this repository. The full list of commands is available at [CLI Commands & Flags](https://github.com/flow-typed/flow-typed/wiki/CLI-Commands-and-Flags). ##### `flow-typed install [package-specification] [--ignoreDeps deps]` Installs libdefs from looking at your package.json. If `package-specification` was specified, only that one libdef will be installed. If the `--ignoreDeps` flag was specified, the libdefs for the specified deps will be ignored. i.e: `--ignoreDeps dev bundled peer`. ```bash flow-typed install foo@1.2.3 ``` ##### `flow-typed validate-defs` Verifies that all files under the `/definitions/` directory are structured and named properly. **It does not run tests**, it only asserts that file and directory names match the expected conventions. This command is run during CI. ##### `flow-typed run-tests [optional-pattern]` For each libdef, find each test and run it with all compatible versions of Flow. If any errors arise that are not *`// $ExpectError`*, the test has failed. Note that this command assumes that the `/definitions/` directory is correctly structured. It should be run *after* running `flow-typed validate-defs`. ##### `flow-typed update-cache [--debug]` By default flow-typed retrieves all available libdefs from its related upstream repository. To make this process more efficient, those libdefs are cached once on your local filesystem. Usually, the cache will automatically be updated after a short grace period during a libdef installation, but sometimes it is useful to do this update manually. Use this command if you want to download the most recent definitions into the cache for yourself. ##### `flow-typed create-stub package-specification [--typescript]` Creates `any`-typed libdef that you can fill in. If the `--typescript` flag was specified, TypeScript definition would be converted to flow-typed libdef format if possible. Please report any issues that you have encountered to [flowgen](https://github.com/joarwilk/flowgen/issues) repository. [flowgen](https://github.com/joarwilk/flowgen) supports most of the TypeScript syntax, however, in some cases manual changes may be needed before use. You can check out supported syntax constructs in flowgen's [“The state of converter” section](https://github.com/joarwilk/flowgen#the-state-of-the-converter). After you have edited these files, consider [contributing](CONTRIBUTING.md) them back to flow-typed. ## Active Maintenance Team [![Andrew Smith](https://github.com/andrewsouthpaw.png?size=100)](https://github.com/andrewsouthpaw) | [![Georges-Antoine Assi](https://github.com/gantoine.png?size=100)](https://github.com/gantoine) | [![Pascal Duez](https://github.com/pascalduez.png?size=100)](https://github.com/pascalduez) | [![Ville Saukkonen](https://github.com/villesau.png?size=100)](https://github.com/villesau) :---:|:---:|:---:|:---: [@AndrewSouthpaw](https://github.com/andrewsouthpaw) | [@GAntoine](https://github.com/gantoine) | [@pascalduez](https://github.com/pascalduez) | [@villesau](https://github.com/villesau)