Skip to content

Commit 1011552

Browse files
author
Keyan Zhang
committed
changed inexplicit any to FlowFixMe
1 parent ee36b61 commit 1011552

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

transforms/__testfixtures__/class-flow1.output.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ var React = require('react');
44

55
class Component extends React.Component {
66
props: {
7-
optionalArray?: Array<any>,
7+
optionalArray?: Array<$FlowFixMe>,
88
optionalBool?: boolean,
99
optionalFunc?: Function,
1010
optionalNumber?: number,
1111
optionalObject?: Object,
1212
optionalString?: string,
13-
optionalNode?: any,
14-
optionalElement?: any,
13+
optionalNode?: $FlowFixMe,
14+
optionalElement?: $FlowFixMe,
1515
optionalMessage?: Message,
1616
optionalEnum?: 'News' | 'Photos' | 1 | true | null | void,
1717
optionalUnion?: string | number | Message,

transforms/__testfixtures__/class-flow3.output.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Component extends React.Component {
2424
optionalNumber?: $FlowFixMe,
2525
optionalObject?: Object,
2626
optionalString?: $FlowFixMe,
27-
optionalNode?: any,
28-
optionalElement?: any,
27+
optionalNode?: $FlowFixMe,
28+
optionalElement?: $FlowFixMe,
2929
optionalMessage?: Message,
3030
optionalEnum?: 'News' | 'Photos' | 1 | true | null,
3131
optionalUnion?: $FlowFixMe,

transforms/class.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,15 @@ module.exports = (file, api, options) => {
637637
any: flowAnyType,
638638
array: j.genericTypeAnnotation(
639639
j.identifier('Array'),
640-
j.typeParameterInstantiation([flowAnyType])
640+
j.typeParameterInstantiation([flowFixMeType])
641641
),
642642
bool: j.booleanTypeAnnotation(),
643-
element: flowAnyType, // flow does the same for `element` type in `propTypes`
643+
element: flowFixMeType, // flow does the same for `element` type in `propTypes`
644644
func: j.genericTypeAnnotation(
645645
j.identifier('Function'),
646646
null
647647
),
648-
node: flowAnyType, // flow does the same for `node` type in `propTypes`
648+
node: flowFixMeType, // flow does the same for `node` type in `propTypes`
649649
number: j.numberTypeAnnotation(),
650650
object: j.genericTypeAnnotation(
651651
j.identifier('Object'),

0 commit comments

Comments
 (0)