Created
March 13, 2016 00:15
-
-
Save also/72f0d9530166af3fea1a to your computer and use it in GitHub Desktop.
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 */ | |
type T1 = {x : number}; | |
type T2 = {y : number}; | |
type T3 = T1 & T2; | |
function mergeAndDoStuff(t1 : T1, t2 : T2) : T3 { | |
const result = Object.assign({}, t1, t2); | |
console.log(result.info.toString()); // at one time, T1 contained info, but it was removed | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment