Skip to content

Instantly share code, notes, and snippets.

@balanza
Last active January 30, 2019 16:29
Show Gist options
  • Select an option

  • Save balanza/7e58dc4391aecca68895d39fc2c3228a to your computer and use it in GitHub Desktop.

Select an option

Save balanza/7e58dc4391aecca68895d39fc2c3228a to your computer and use it in GitHub Desktop.
type Mobile {
confirmed: boolean,
value: string
}
type User {
/* name, surname, etc */
mobile: Mobile
}
// an user with confirmed mobile
const User1 = {
name: 'Mario',
mobile: {
confirmed: true,
value: '123456789'
}
}
// an user with UNconfirmed mobile
const User2 = {
name: 'Luigi',
mobile: {
confirmed: false,
value: '987654321'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment