@@ -65,7 +65,7 @@ const Coupons = {
6565}
6666
6767let bookingId = 0
68- function booking ( name , roomType , roomNumber , cost , email , couponId ) {
68+ function booking ( name : string , roomType : RoomType , roomNumber : number , cost : number , email : string , couponId : keyof typeof Coupons ) {
6969 bookingId ++
7070 const bookingStartDate = new Date ( Date . now ( ) + bookingId * 86400 )
7171 const bookingEndDate = new Date ( Date . now ( ) + ( bookingId + 7 ) * 86400 )
@@ -138,8 +138,8 @@ export const forecasts = [
138138
139139
140140let trackId = 0
141- function track ( name , artist , album , year ) {
142- return { id :++ trackId , name, artist, album, year }
141+ function track ( name : string , artist : string , album : string , year : number ) {
142+ return { id :++ trackId , name, artist, album, year }
143143}
144144
145145export const tracks = [
@@ -172,11 +172,11 @@ export const allTypesJson = {
172172}
173173
174174let playerId = 0
175- function player ( firstName , lastName , phoneNumbers , profile ) {
175+ function player ( firstName : string , lastName : string , phoneNumbers : any [ ] , profile : any ) {
176176 let email = `${ firstName . toLowerCase ( ) } @${ lastName . toLowerCase ( ) } .com`
177177 return { id :++ playerId , firstName, lastName, email, phoneNumbers, profile }
178178}
179- function profile ( userName , role , region , highScore , gamesPlayed , coverUrl ) {
179+ function profile ( userName : string , role : string , region : string , highScore : number , gamesPlayed : number , coverUrl : string ) {
180180 return { userName, role, region, highScore, gamesPlayed, coverUrl, createdBy :`${ userName } @email.com` }
181181}
182182
0 commit comments