Created
February 13, 2018 00:06
-
-
Save ajcrites/3c76a8f89d0d9c93a89dbb79ea7f1c0c to your computer and use it in GitHub Desktop.
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
export interface Screen { | |
screen: string; | |
} | |
export interface ResetScreen<T> extends Screen { | |
passProps?: T; | |
} | |
export interface PushedScreen<T> extends ResetScreen<T> { | |
} | |
interface BioProps { | |
username: string; | |
} | |
function push<T>(params: PushedScreen<T>) { | |
return params.passProps; | |
} | |
push<BioProps>({ screen: 'hi', passProps: { username: 'hi' } }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment