Skip to content

Commit e88f4ba

Browse files
author
Kent C. Dodds
committed
SETUP FOR TYPESCRIPT
1 parent 650e66f commit e88f4ba

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/typescript-example.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function add(a, b) {
2+
return a + b
3+
}
4+
5+
function getFullName(user) {
6+
const {
7+
name: {first, middle, last},
8+
} = user
9+
return [first, middle, last].filter(Boolean).join('')
10+
}
11+
12+
add(1, 'two')
13+
14+
getFullName({name: {first: 'Joe', midd1e: 'Bud', last: 'Matthews'}})

0 commit comments

Comments
 (0)