babel-plugin-react-flow-props-to-prop-types:将Flow React props批注转换为PropTypes

时间:2021-01-30 08:20:41
【文件属性】:
文件名称:babel-plugin-react-flow-props-to-prop-types:将Flow React props批注转换为PropTypes
文件大小:49KB
文件格式:ZIP
更新时间:2021-01-30 08:20:41
react flow babel flowtype proptypes babel插件React流道具到道具类型 将Flow React道具注释转换为PropTypes 支持大多数流量类型(见下文) 维持评论 跨模块工作(可以导入类型) 支持的: any/mixed未知类型 void/null空类型 number / string / boolean元 42 / "hello" / true文字 [1, 2, 3]元组 { ... }对象 { prop: number }对象属性 { prop?: number }可选属性 { [prop: string]: number }可选索引器 { [key: string]: number }对象索引器 Array数组 Object未知对象 Function未知功能 RegExp正则表达式 boolean | string boolean | string { foo: number } & { bar: string }交叉点 引用其他类型: type Alias = number -类型别名 interface Stuff {} -接口 class Thing {} -类声明 im
【文件预览】:
babel-plugin-react-flow-props-to-prop-types-master
----.travis.yml(63B)
----.babelrc(80B)
----.flowconfig(39B)
----package.json(2KB)
----LICENSE(558B)
----src()
--------index.js(2KB)
--------__tests__()
--------error.js(267B)
--------findPropsClassProperty.js(435B)
--------types.js(420B)
--------matchExported.js(1KB)
--------convertTypeToPropTypes.js(12KB)
----.gitignore(32B)
----README.md(3KB)
----yarn.lock(118KB)
----fixtures()
--------imports()
--------import-type-as()
--------import-class()
--------import-type-for-top-level-intersection()

网友评论