Skip to content

Commit

Permalink
changed inexplicit any to FlowFixMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyan Zhang committed Jul 5, 2016
1 parent ee36b61 commit 1011552
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions transforms/__testfixtures__/class-flow1.output.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ var React = require('react');

class Component extends React.Component {
props: {
optionalArray?: Array<any>,
optionalArray?: Array<$FlowFixMe>,
optionalBool?: boolean,
optionalFunc?: Function,
optionalNumber?: number,
optionalObject?: Object,
optionalString?: string,
optionalNode?: any,
optionalElement?: any,
optionalNode?: $FlowFixMe,
optionalElement?: $FlowFixMe,
optionalMessage?: Message,
optionalEnum?: 'News' | 'Photos' | 1 | true | null | void,
optionalUnion?: string | number | Message,
Expand Down
4 changes: 2 additions & 2 deletions transforms/__testfixtures__/class-flow3.output.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Component extends React.Component {
optionalNumber?: $FlowFixMe,
optionalObject?: Object,
optionalString?: $FlowFixMe,
optionalNode?: any,
optionalElement?: any,
optionalNode?: $FlowFixMe,
optionalElement?: $FlowFixMe,
optionalMessage?: Message,
optionalEnum?: 'News' | 'Photos' | 1 | true | null,
optionalUnion?: $FlowFixMe,
Expand Down
6 changes: 3 additions & 3 deletions transforms/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,15 @@ module.exports = (file, api, options) => {
any: flowAnyType,
array: j.genericTypeAnnotation(
j.identifier('Array'),
j.typeParameterInstantiation([flowAnyType])
j.typeParameterInstantiation([flowFixMeType])
),
bool: j.booleanTypeAnnotation(),
element: flowAnyType, // flow does the same for `element` type in `propTypes`
element: flowFixMeType, // flow does the same for `element` type in `propTypes`
func: j.genericTypeAnnotation(
j.identifier('Function'),
null
),
node: flowAnyType, // flow does the same for `node` type in `propTypes`
node: flowFixMeType, // flow does the same for `node` type in `propTypes`
number: j.numberTypeAnnotation(),
object: j.genericTypeAnnotation(
j.identifier('Object'),
Expand Down

0 comments on commit 1011552

Please sign in to comment.