Created
August 6, 2019 21:35
-
-
Save Jexordexan/1a1908d81a25ece8f32161ab0b6217a5 to your computer and use it in GitHub Desktop.
Medium: props option 1
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
interface Props { | |
user: api.User | |
alerts: api.Alert[] | |
} | |
export default createComponent({ | |
name: "UserAlerts", | |
props: { | |
user: Object, | |
alerts: Array, | |
} as any as Props, | |
setup(props) { | |
// Typescript infers typeof 'props' to be `Props` | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment