Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Update typings based on flow v0.53 changes #479

Merged
merged 1 commit into from
Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion types/flow-example/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[ignore]
.*/node_modules/eslint-plugin-jsx-a11y/.*
# TODO: remove after react-motion will be updated with new flow typedefs
.*/node_modules/react-motion/lib/*

[include]

[libs]
../flow-typed/recompose_v0.24.x/flow_v0.49.x-/recompose_v0.24.x.js
../flow-typed/recompose_v0.24.x/flow_v0.53.x-/recompose_v0.24.x.js

[options]
suppress_comment=\\(.\\|\n\\)*\\$ExpectError
Expand Down
9 changes: 9 additions & 0 deletions types/flow-example/flow-typed/react-motion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// TODO: remove after react-motion will be updated with new flow typedefs
declare module 'react-motion' {
declare export function spring<A>(
val: number,
config?: A
): { val: number, ...$Exact<A> }

declare export var TransitionMotion: React$ComponentType<{ styles: any }>
}
2 changes: 1 addition & 1 deletion types/flow-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"change-emitter": "^0.1.6",
"flow": "^0.2.3",
"flow-bin": "^0.52.0",
"flow-bin": "^0.53.0",
"glamor": "^3.0.0-3",
"glamor-reset": "^3.0.0-2",
"hoist-non-react-statics": "^2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions types/flow-example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2536,9 +2536,9 @@ flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"

flow-bin@^0.52.0:
version "0.52.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.52.0.tgz#b6d9abe8bcd1ee5c62df386451a4e2553cadc3a3"
flow-bin@^0.53.0:
version "0.53.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.53.0.tgz#f7830e609ca02b12db4127114213cccc7c0771b9"

flow@^0.2.3:
version "0.2.3"
Expand Down
2 changes: 1 addition & 1 deletion types/flow-typed/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[include]

[libs]
../flow-typed/recompose_v0.24.x/flow_v0.49.x-/recompose_v0.24.x.js
../flow-typed/recompose_v0.24.x/flow_v0.53.x-/recompose_v0.24.x.js

[options]
suppress_comment=\\(.\\|\n\\)*\\$ExpectError
Expand Down
2 changes: 1 addition & 1 deletion types/flow-typed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "istarkov@gmail.com",
"license": "MIT",
"devDependencies": {
"flow-bin": "^0.52.0",
"flow-bin": "^0.53.0",
"prop-types": "^15.5.10",
"rxjs": "^5.4.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ declare module 'recompose' {
v: (props: Enhanced) => V
) => V

declare type FunctionComponent<A> = (props: A) => ?React$Element<any>

declare type ClassComponent<D, A, S> = Class<React$Component<D, A, S>>

declare type UnaryFn<A, R> = (a: A) => R

declare type Compose = (<A, B, C, D, E, F, G, H, I>(
Expand Down Expand Up @@ -130,9 +126,7 @@ declare module 'recompose' {
// Public declarations
// -----------------------------------------------------------------

declare export type Component<A> =
| FunctionComponent<A>
| ClassComponent<any, A, any>
declare export type Component<A> = React$ComponentType<A>

declare export type HOC<Base, Enhanced> = UnaryFn<
Component<Base>,
Expand Down Expand Up @@ -314,12 +308,12 @@ declare module 'recompose' {
declare export function createEagerElement<A>(
type: Component<A> | string,
props: ?A,
children?: ?ReactNode
children?: ?React$Node
): React$Element<any>

declare export function createEagerFactory<A>(
type: Component<A> | string
): (props: ?A, children?: ?ReactNode) => React$Element<any>
): (props: ?A, children?: ?React$Node) => React$Element<any>

declare export function createSink<A>(
callback: (props: A) => void
Expand All @@ -335,7 +329,10 @@ declare module 'recompose' {

declare export function componentFromStream<T>(
(props$: any) => any
): T => React.Element<*>
): T => React$Element<any>

declare export function createEventHandler(): { stream: any, handler: Function }
declare export function createEventHandler(): {
stream: any,
handler: Function,
}
}
6 changes: 3 additions & 3 deletions types/flow-typed/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ fbjs@^0.8.9:
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

flow-bin@^0.52.0:
version "0.52.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.52.0.tgz#b6d9abe8bcd1ee5c62df386451a4e2553cadc3a3"
flow-bin@^0.53.0:
version "0.53.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.53.0.tgz#f7830e609ca02b12db4127114213cccc7c0771b9"

iconv-lite@~0.4.13:
version "0.4.18"
Expand Down