We can derive type from a function like this.
const createPerson = () => ({
firstName: 'Yasunori',
lastName: 'Tanaka',
})
type Person = ReturnType<typeof createPerson>
And then, use that as Person
type.
We can derive type from a function like this.
const createPerson = () => ({
firstName: 'Yasunori',
lastName: 'Tanaka',
})
type Person = ReturnType<typeof createPerson>
And then, use that as Person
type.
For further actions, you may consider blocking this person and/or reporting abuse
Lucas Brogni -
Chris Cook -
Nilupul Perera -
ymc9 -
Top comments (0)