Skip to content

Instantly share code, notes, and snippets.

@Jexordexan
Created August 6, 2019 21:35
Show Gist options
  • Save Jexordexan/5edc778ffa305fd68bcd1dfa6b00cf77 to your computer and use it in GitHub Desktop.
Save Jexordexan/5edc778ffa305fd68bcd1dfa6b00cf77 to your computer and use it in GitHub Desktop.
import { prop } from 'ts-tricks-hidey-hole'
export default createComponent({
name: "UserAlerts",
props: {
user: prop<User>(Object),
alerts: prop<Alert[]>(Array),
},
setup(props) {
// Typescript infers typeof 'props' to be:
// {
// user: User,
// alerts: Alert[],
// }
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment