Created
January 18, 2019 18:03
-
-
Save glasserc/757049f995199a58550ad60f13da0b92 to your computer and use it in GitHub Desktop.
Flow types at module boundary
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 type ActionType = "hello"; | |
export function action(): ActionType { | |
return "hello"; | |
} |
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 { ActionType } from "./action"; | |
import * as ActionStuff from "./action"; | |
function callAction(actionModule: {[string]: () => ActionType}) { | |
} | |
callAction(ActionStuff); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment