Last active
October 19, 2018 13:14
-
-
Save dfroger/81947b31b96913a71d60bb477c91928c to your computer and use it in GitHub Desktop.
reproduce a bug in flow (0.83.0 for example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
export class Bar {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import type { A } from './redux'; | |
export type B = string; | |
export type C = string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import { Bar } from './bar'; | |
import type { C } from './c'; | |
export class Foo { | |
constructor(bar: Bar) {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import { Bar } from './bar'; | |
import { Foo } from './foo'; | |
export const bar = new Bar(); | |
export const foo = new Foo(bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import type { B } from './c'; | |
import type { Foo } from './foo'; | |
export type Action = { type: 'ACTION1' } | { type: 'ACTION2', foo: Foo }; | |
export type A = string; | |
const reducer = (action: Action): number => action.type === 'ACTION1' ? 1 : 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment