• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

flow-typed/flow-typed: A central repository for Flow library definitions

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

flow-typed/flow-typed

开源软件地址(OpenSource Url):

https://github.com/flow-typed/flow-typed

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

flow-typed

A repository of high-quality, third-party library type definitions for use with Flow.

ci status npm package docs discord package health


We're migrating our mainline from master to main

And with that comes new features, most notably the support for definition dependencies.

Learn how to add dependencies to a definition from the main branch docs which can be consumed with the v4 CLI.

$ yarn global add flow-typed@next
# or
$ npm install -g flow-typed@next

What's happening to master?

Nothing for the most part! CLI versions < v4 will still pull definitions from master so if you have library definitions that don't require dependencies we still recommend you contribute to master and it'll get periodically synced back to main for users >= v4.

Eventually we will deprecate master in favour of main.


Check out the quick start page in the docs to get started. It will walk you through installing typedefs, using them, as well as writing and including your own.

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 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!

The 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 in the docs .

FAQs

Before opening an issue, take a look at the FAQs. Chances are your question has already been answered! If not, don't hesitate to open an issue.

How Do I Contribute Library Definitions?

Just send a pull request! The documentation highlighted in CONTRIBUTING.md should give a detailed overview of how to raise a pull request following our best practices.

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.

Active Maintenance Team

Andrew Smith Brian Chen Georges-Antoine Assi Pascal Duez Ville Saukkonen
@AndrewSouthpaw @Brianzchen @GAntoine @pascalduez @villesau



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
gabrielemariotti/cardslib: Android Library to build a UI Card发布时间:2022-08-15
下一篇:
jorgecasas/php-ml: PHP Machine Learning library发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap