Skip to content

Commit b2f72c0

Browse files
committed
to cherry-pick: considering room in break timeslot ids
1 parent a53ea9f commit b2f72c0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

shared/daily-schedule.firestore.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,17 @@ export type RecordingPlatform = "youtube"|"unknown"/* |"twitch"|"dailymotion"...
6363
export type TimeSlotBase<START extends ISODatetime = ISODatetime, END extends ISODatetime = ISODatetime> = {
6464
start: START,
6565
end: END,
66-
id: `${START}--${END}`,
6766
}
6867

69-
export type BreakTimeSlot = TimeSlotBase & { type: 'break', break: Break }
70-
export type TalksTimeSlot = TimeSlotBase & { type: 'talks', talks: Talk[] }
68+
export type BreakTimeSlot<
69+
START extends ISODatetime = ISODatetime,
70+
END extends ISODatetime = ISODatetime,
71+
ROOM_ID extends string = string,
72+
> = TimeSlotBase<START, END> & { id: `${START}--${END}--${ROOM_ID}`, type: 'break', break: Break }
73+
export type TalksTimeSlot<
74+
START extends ISODatetime = ISODatetime,
75+
END extends ISODatetime = ISODatetime,
76+
> = TimeSlotBase<START, END> & { id: `${START}--${END}`, type: 'talks', talks: Talk[] }
7177

7278
export type ScheduleTimeSlot = BreakTimeSlot | TalksTimeSlot
7379

0 commit comments

Comments
 (0)