Last active
May 30, 2020 19:05
-
-
Save diegogriep/fd72e3d0384f8fd3b8cd62e612cc0c48 to your computer and use it in GitHub Desktop.
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 DriverF1 { | |
firstName: string; | |
lastName: string; | |
} | |
const newDriverF1 = (obj: DriverF1) => { | |
return { | |
...obj, | |
fullName: `${obj.firstName} ${obj.lastName}` | |
} | |
} | |
let hamilton = newDriverF1({ firstName: 'Lewis', lastName: 'Hamilton' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment