Commit b835f02
committed
fix(calendar): resolve type errors
Resolved TypeScript type errors in the calendar/quickstart/quickstart.gs file.
- Added JSDoc `@typedef` for CalendarEvent and CalendarEventDateTime to define the object structures.
- Added a check to ensure the Calendar advanced service is enabled.
- Cast the error object in the catch block to the Error type.
- Added checks for undefined `events` and `event.start` to prevent runtime errors.1 parent 275a497 commit b835f02
1 file changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
17 | 29 | | |
18 | 30 | | |
| 31 | + | |
19 | 32 | | |
20 | 33 | | |
21 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
| |||
33 | 50 | | |
34 | 51 | | |
35 | 52 | | |
36 | | - | |
| 53 | + | |
37 | 54 | | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
41 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
| |||
47 | 67 | | |
48 | 68 | | |
49 | 69 | | |
50 | | - | |
| 70 | + | |
51 | 71 | | |
52 | 72 | | |
53 | 73 | | |
0 commit comments