Skip to content

Commit 6f96fcf

Browse files
committed
fix(createNumericField): fix flow error
1 parent a780ee6 commit 6f96fcf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4245
-154
lines changed

.flowconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[ignore]
22
<PROJECT_ROOT>/node_modules/fbjs/.*
33
<PROJECT_ROOT>/node_modules/.*/tests?/.*\.json
4+
<PROJECT_ROOT>/lib
45

56
[include]
67
./src

flow-typed/npm/@commitlint/cli_vx.x.x.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 6b3e411701babc2e6f6520580da2616a
2-
// flow-typed version: <<STUB>>/@commitlint/cli_v^5.2.5/flow_v0.61.0
1+
// flow-typed signature: c385fc8daf6099de874fa84ad277b3d3
2+
// flow-typed version: <<STUB>>/@commitlint/cli_v^6.0.2/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:
@@ -38,6 +38,10 @@ declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.conf
3838
declare module.exports: any;
3939
}
4040

41+
declare module '@commitlint/cli/fixtures/issue-prefixes/commitlint.config' {
42+
declare module.exports: any;
43+
}
44+
4145
declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config' {
4246
declare module.exports: any;
4347
}
@@ -95,6 +99,9 @@ declare module '@commitlint/cli/fixtures/inner-scope/commitlint.config.js' {
9599
declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config.js' {
96100
declare module.exports: $Exports<'@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config'>;
97101
}
102+
declare module '@commitlint/cli/fixtures/issue-prefixes/commitlint.config.js' {
103+
declare module.exports: $Exports<'@commitlint/cli/fixtures/issue-prefixes/commitlint.config'>;
104+
}
98105
declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config.js' {
99106
declare module.exports: $Exports<'@commitlint/cli/fixtures/outer-scope/commitlint.config'>;
100107
}

flow-typed/npm/@commitlint/config-conventional_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 211481ade58a5d1b48d157e08d068cc3
2-
// flow-typed version: <<STUB>>/@commitlint/config-conventional_v^5.2.3/flow_v0.61.0
1+
// flow-typed signature: e5ba9731f6adfdf5799044aef2691202
2+
// flow-typed version: <<STUB>>/@commitlint/config-conventional_v^6.0.2/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/@jedwards1211/eslint-config-flow_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 7be3f328e60a5bb311c142ba0bf1e16d
2-
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config-flow_v^1.0.0/flow_v0.61.0
1+
// flow-typed signature: 819ae44c81fd5ac17f269a7608264024
2+
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config-flow_v^1.0.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// flow-typed signature: 30cbec4ff610e3c2a1b9d1924f4a4650
2+
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config-react_v^3.0.0/flow_v0.62.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* '@jedwards1211/eslint-config-react'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module '@jedwards1211/eslint-config-react' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
26+
27+
// Filename aliases
28+
declare module '@jedwards1211/eslint-config-react/index' {
29+
declare module.exports: $Exports<'@jedwards1211/eslint-config-react'>;
30+
}
31+
declare module '@jedwards1211/eslint-config-react/index.js' {
32+
declare module.exports: $Exports<'@jedwards1211/eslint-config-react'>;
33+
}

flow-typed/npm/@jedwards1211/eslint-config_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 6be0a15102c7305fbc30e7744c9e0e60
2-
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config_v^1.0.0/flow_v0.61.0
1+
// flow-typed signature: a507bafa0b16f1bc2c192ffcbe91be5e
2+
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config_v^1.0.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-cli_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: debed58282ea443d028bc66577ab76de
2-
// flow-typed version: <<STUB>>/babel-cli_v^6.23.0/flow_v0.61.0
1+
// flow-typed signature: 687333e8fe73cb7fbfab1cb158cb6391
2+
// flow-typed version: <<STUB>>/babel-cli_v^6.22.2/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-core_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 669de618145bac35eba54f80d782f867
2-
// flow-typed version: <<STUB>>/babel-core_v^6.23.1/flow_v0.61.0
1+
// flow-typed signature: 54432af921c6c7aa8e68ee357ed2c309
2+
// flow-typed version: <<STUB>>/babel-core_v^6.22.1/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-eslint_vx.x.x.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 6b5138b496b1c155bc0d934dce2ec44f
2-
// flow-typed version: <<STUB>>/babel-eslint_v^7.1.1/flow_v0.61.0
1+
// flow-typed signature: 8f7a81b3668e6936636296d58f29bb4d
2+
// flow-typed version: <<STUB>>/babel-eslint_v^7.1.1/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:
@@ -26,6 +26,10 @@ declare module 'babel-eslint/babylon-to-espree/attachComments' {
2626
declare module.exports: any;
2727
}
2828

29+
declare module 'babel-eslint/babylon-to-espree/convertComments' {
30+
declare module.exports: any;
31+
}
32+
2933
declare module 'babel-eslint/babylon-to-espree/convertTemplateType' {
3034
declare module.exports: any;
3135
}
@@ -50,6 +54,9 @@ declare module 'babel-eslint/babylon-to-espree/toTokens' {
5054
declare module 'babel-eslint/babylon-to-espree/attachComments.js' {
5155
declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>;
5256
}
57+
declare module 'babel-eslint/babylon-to-espree/convertComments.js' {
58+
declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertComments'>;
59+
}
5360
declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' {
5461
declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>;
5562
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// flow-typed signature: 62fa329df9e5bc3feca8a833742c6dad
2+
// flow-typed version: <<STUB>>/babel-plugin-flow-react-proptypes_v^2.2.1/flow_v0.62.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'babel-plugin-flow-react-proptypes'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module 'babel-plugin-flow-react-proptypes' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module 'babel-plugin-flow-react-proptypes/lib/convertToPropTypes' {
26+
declare module.exports: any;
27+
}
28+
29+
declare module 'babel-plugin-flow-react-proptypes/lib/index' {
30+
declare module.exports: any;
31+
}
32+
33+
declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst' {
34+
declare module.exports: any;
35+
}
36+
37+
declare module 'babel-plugin-flow-react-proptypes/lib/util' {
38+
declare module.exports: any;
39+
}
40+
41+
// Filename aliases
42+
declare module 'babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js' {
43+
declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/convertToPropTypes'>;
44+
}
45+
declare module 'babel-plugin-flow-react-proptypes/lib/index.js' {
46+
declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/index'>;
47+
}
48+
declare module 'babel-plugin-flow-react-proptypes/lib/makePropTypesAst.js' {
49+
declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/makePropTypesAst'>;
50+
}
51+
declare module 'babel-plugin-flow-react-proptypes/lib/util.js' {
52+
declare module.exports: $Exports<'babel-plugin-flow-react-proptypes/lib/util'>;
53+
}

flow-typed/npm/babel-plugin-istanbul_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: c4168d117917dbd4a5fabebea5285444
2-
// flow-typed version: <<STUB>>/babel-plugin-istanbul_v^4.0.0/flow_v0.61.0
1+
// flow-typed signature: ae00cf6ecdbf5e4fb8cebe739b157eef
2+
// flow-typed version: <<STUB>>/babel-plugin-istanbul_v^4.0.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// flow-typed signature: fe5eabf0b44803e48fa8e82bf72709c9
2+
// flow-typed version: <<STUB>>/babel-plugin-transform-react-constant-elements_v^6.9.1/flow_v0.62.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'babel-plugin-transform-react-constant-elements'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module 'babel-plugin-transform-react-constant-elements' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module 'babel-plugin-transform-react-constant-elements/lib/index' {
26+
declare module.exports: any;
27+
}
28+
29+
// Filename aliases
30+
declare module 'babel-plugin-transform-react-constant-elements/lib/index.js' {
31+
declare module.exports: $Exports<'babel-plugin-transform-react-constant-elements/lib/index'>;
32+
}

flow-typed/npm/babel-plugin-transform-runtime_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: d199216ac1aba5e51f670d9be94d52ac
2-
// flow-typed version: <<STUB>>/babel-plugin-transform-runtime_v^6.23.0/flow_v0.61.0
1+
// flow-typed signature: dfd7cc84f7be39575d7004378783b21f
2+
// flow-typed version: <<STUB>>/babel-plugin-transform-runtime_v^6.22.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-preset-es2015_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: d8f4c768b67c5c34bbefee81693df8e8
2-
// flow-typed version: <<STUB>>/babel-preset-es2015_v^6.22.0/flow_v0.61.0
1+
// flow-typed signature: 9d05878423e50af976ca0391246b0ae8
2+
// flow-typed version: <<STUB>>/babel-preset-es2015_v^6.22.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-preset-flow_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: d0d6bbe626f5acb16d685f9a6786460e
2-
// flow-typed version: <<STUB>>/babel-preset-flow_v^6.23.0/flow_v0.61.0
1+
// flow-typed signature: 617b62c364dce6603f408f14140b6b80
2+
// flow-typed version: <<STUB>>/babel-preset-flow_v^6.23.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// flow-typed signature: f98ad07a1d14daf672a7e96338bf163f
2+
// flow-typed version: <<STUB>>/babel-preset-react_v^6.16.0/flow_v0.62.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'babel-preset-react'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module 'babel-preset-react' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module 'babel-preset-react/lib/index' {
26+
declare module.exports: any;
27+
}
28+
29+
// Filename aliases
30+
declare module 'babel-preset-react/lib/index.js' {
31+
declare module.exports: $Exports<'babel-preset-react/lib/index'>;
32+
}

flow-typed/npm/babel-preset-stage-1_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 749a97ef8c8f17b42c82ab34697f53c9
2-
// flow-typed version: <<STUB>>/babel-preset-stage-1_v^6.22.0/flow_v0.61.0
1+
// flow-typed signature: 4b96a6ce16d033201d80b2f24e15e178
2+
// flow-typed version: <<STUB>>/babel-preset-stage-1_v^6.22.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-register_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 1807e4a15c56d41378a573e2bf0f7283
2-
// flow-typed version: <<STUB>>/babel-register_v^6.23.0/flow_v0.61.0
1+
// flow-typed signature: 54ae7c120b6e4df2605856f3e90f4db4
2+
// flow-typed version: <<STUB>>/babel-register_v^6.23.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/babel-runtime_vx.x.x.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: 9a2c0fd2f13cf3628642fa81ab65a1bc
2-
// flow-typed version: <<STUB>>/babel-runtime_v^6.23.0/flow_v0.61.0
1+
// flow-typed signature: 99a22e9d116954c7602968cd17bbb0ac
2+
// flow-typed version: <<STUB>>/babel-runtime_v^6.23.0/flow_v0.62.0
33

44
/**
55
* This is an autogenerated libdef stub for:

flow-typed/npm/chai_v3.5.x.js renamed to flow-typed/npm/chai_v4.x.x.js

+31-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: f80f981d039947b3f29f0f437061852a
2-
// flow-typed version: da30fe6876/chai_v3.5.x/flow_>=v0.25.0
1+
// flow-typed signature: 5ebfab521cce28c691a4fdfe8992f4e2
2+
// flow-typed version: da30fe6876/chai_v4.x.x/flow_>=v0.25.0
33

44
declare module "chai" {
55
declare type ExpectChain<T> = {
@@ -30,6 +30,7 @@ declare module "chai" {
3030
contain: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),
3131
contains: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),
3232

33+
eq: (value: T) => ExpectChain<T>,
3334
eql: (value: T) => ExpectChain<T>,
3435
equal: (value: T) => ExpectChain<T>,
3536
equals: (value: T) => ExpectChain<T>,
@@ -41,6 +42,7 @@ declare module "chai" {
4142
within: (start: T & number, finish: T & number) => ExpectChain<T>,
4243

4344
instanceof: (constructor: mixed) => ExpectChain<T>,
45+
nested: ExpectChain<T>,
4446
property: <P>(
4547
name: string,
4648
value?: P
@@ -90,6 +92,7 @@ declare module "chai" {
9092
extensible: () => ExpectChain<T>,
9193
sealed: () => ExpectChain<T>,
9294
frozen: () => ExpectChain<T>,
95+
NaN: () => ExpectChain<T>,
9396

9497
// chai-immutable
9598
size: (n: number) => ExpectChain<T>,
@@ -113,6 +116,7 @@ declare module "chai" {
113116
rejectedWith: (value: mixed) => Promise<mixed> & ExpectChain<T>,
114117
rejected: () => Promise<mixed> & ExpectChain<T>,
115118
notify: (callback: () => mixed) => ExpectChain<T>,
119+
fulfilled: () => Promise<mixed> & ExpectChain<T>,
116120

117121
// chai-subset
118122
containSubset: (obj: Object | Object[]) => ExpectChain<T>,
@@ -121,10 +125,17 @@ declare module "chai" {
121125
dispatchedActions: (
122126
actions: Array<Object | ((action: Object) => any)>
123127
) => ExpectChain<T>,
124-
dispatchedTypes: (actions: Array<string>) => ExpectChain<T>
128+
dispatchedTypes: (actions: Array<string>) => ExpectChain<T>,
129+
130+
// chai-enzyme
131+
attr: (key: string, val?: any) => ExpectChain<T>,
132+
data: (key: string, val?: any) => ExpectChain<T>,
133+
prop: (key: string, val?: any) => ExpectChain<T>,
134+
state: (key: string, val?: any) => ExpectChain<T>,
135+
value: (val: string) => ExpectChain<T>
125136
};
126137

127-
declare function expect<T>(actual: T): ExpectChain<T>;
138+
declare function expect<T>(actual: T, message?: string): ExpectChain<T>;
128139

129140
declare function use(plugin: (chai: Object, utils: Object) => void): void;
130141

@@ -248,6 +259,22 @@ declare module "chai" {
248259
errorMsgMatcher?: string | RegExp,
249260
msg?: string
250261
): void;
262+
263+
static closeTo(
264+
actual: number,
265+
expected: number,
266+
delta: number,
267+
msg?: string
268+
): void;
269+
static approximately(
270+
actual: number,
271+
expected: number,
272+
delta: number,
273+
msg?: string
274+
): void;
275+
276+
// chai-immutable
277+
static sizeOf(val: mixed, length: number): void;
251278
}
252279

253280
declare var config: {

0 commit comments

Comments
 (0)