Last active
June 27, 2018 21:03
-
-
Save teamdandelion/309fad904e757ade72ec6753f279ed78 to your computer and use it in GitHub Desktop.
Broken Flow when using import *
This file contains hidden or 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
[ignore] | |
[include] | |
[libs] | |
[lints] | |
[options] | |
[strict] |
This file contains hidden or 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 * as D from "./dep" | |
type Entry = D.FooEntry | D.BarEntry; | |
function address<T: Entry>(e: T): $PropertyType<T, "address"> { | |
return e.address; | |
} | |
This file contains hidden or 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 FooAddress = {| | |
+foo: number; | |
|}; | |
export type BarAddress = {| | |
+bar: number; | |
|}; | |
export type FooEntry = {| | |
+address: FooAddress, | |
|}; | |
export type BarEntry = {| | |
+address: BarAddress, | |
|}; | |
This file contains hidden or 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
{ | |
"name": "sadflow", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"flow-bin": "^0.75.0" | |
} | |
} |
This file contains hidden or 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 {FooEntry, BarEntry} from "./dep"; | |
type Entry = FooEntry | BarEntry; | |
function address<T: Entry>(e: T): $PropertyType<T, "address"> { | |
return e.address; | |
} | |
This file contains hidden or 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
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
flow-bin@^0.75.0: | |
version "0.75.0" | |
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.75.0.tgz#b96d1ee99d3b446a3226be66b4013224ce9df260" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment