ical-generator 6.0.2-develop.1 → 6.0.2-develop.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -53,7 +53,7 @@ declare enum ICalAttendeeType {
53
53
  UNKNOWN = "UNKNOWN"
54
54
  }
55
55
  /**
56
- * Usually you get an `ICalAttendee` object like this:
56
+ * Usually you get an {@link ICalAttendee} object like this:
57
57
  *
58
58
  * ```javascript
59
59
  * import ical from 'ical-generator';
@@ -62,7 +62,7 @@ declare enum ICalAttendeeType {
62
62
  * const attendee = event.createAttendee({ email: 'mail@example.com' });
63
63
  * ```
64
64
  *
65
- * You can also use the [[`ICalAttendee`]] object directly:
65
+ * You can also use the {@link ICalAttendee} object directly:
66
66
  *
67
67
  * ```javascript
68
68
  * import ical, {ICalAttendee} from 'ical-generator';
@@ -74,11 +74,11 @@ declare class ICalAttendee {
74
74
  private readonly data;
75
75
  private readonly event;
76
76
  /**
77
- * Constructor of [[`ICalAttendee`]]. The event reference is
77
+ * Constructor of {@link ICalAttendee}. The event reference is
78
78
  * required to query the calendar's timezone when required.
79
79
  *
80
80
  * @param data Attendee Data
81
- * @param calendar Reference to ICalEvent object
81
+ * @param event Reference to ICalEvent object
82
82
  */
83
83
  constructor(data: ICalAttendeeData, event: ICalEvent);
84
84
  /**
@@ -128,7 +128,7 @@ declare class ICalAttendee {
128
128
  role(): ICalAttendeeRole;
129
129
  /**
130
130
  * Set the attendee's role, defaults to `REQ` / `REQ-PARTICIPANT`.
131
- * Checkout [[`ICalAttendeeRole`]] for available roles.
131
+ * Checkout {@link ICalAttendeeRole} for available roles.
132
132
  *
133
133
  * @since 0.2.0
134
134
  */
@@ -149,7 +149,7 @@ declare class ICalAttendee {
149
149
  */
150
150
  status(): ICalAttendeeStatus | null;
151
151
  /**
152
- * Set the attendee's status. See [[`ICalAttendeeStatus`]]
152
+ * Set the attendee's status. See {@link ICalAttendeeStatus}
153
153
  * for available status options.
154
154
  *
155
155
  * @since 0.2.0
@@ -162,7 +162,7 @@ declare class ICalAttendee {
162
162
  type(): ICalAttendeeType;
163
163
  /**
164
164
  * Set attendee's type (a.k.a. CUTYPE).
165
- * See [[`ICalAttendeeType`]] for available status options.
165
+ * See {@link ICalAttendeeType} for available status options.
166
166
  *
167
167
  * @since 0.2.3
168
168
  */
@@ -176,7 +176,7 @@ declare class ICalAttendee {
176
176
  * Set the attendee's delegated-to field.
177
177
  *
178
178
  * Creates a new Attendee if the passed object is not already a
179
- * [[`ICalAttendee`]] object. Will set the `delegatedTo` and
179
+ * {@link ICalAttendee} object. Will set the `delegatedTo` and
180
180
  * `delegatedFrom` attributes.
181
181
  *
182
182
  * Will also set the `status` to `DELEGATED`, if attribute is set.
@@ -201,7 +201,7 @@ declare class ICalAttendee {
201
201
  * Set the attendee's delegated-from field
202
202
  *
203
203
  * Creates a new Attendee if the passed object is not already a
204
- * [[`ICalAttendee`]] object. Will set the `delegatedTo` and
204
+ * {@link ICalAttendee} object. Will set the `delegatedTo` and
205
205
  * `delegatedFrom` attributes.
206
206
  *
207
207
  * @param delegatedFrom
@@ -210,7 +210,7 @@ declare class ICalAttendee {
210
210
  /**
211
211
  * Create a new attendee this attendee delegates to and returns
212
212
  * this new attendee. Creates a new attendee if the passed object
213
- * is not already an [[`ICalAttendee`]].
213
+ * is not already an {@link ICalAttendee}.
214
214
  *
215
215
  * ```javascript
216
216
  * const cal = ical();
@@ -226,7 +226,7 @@ declare class ICalAttendee {
226
226
  /**
227
227
  * Create a new attendee this attendee delegates from and returns
228
228
  * this new attendee. Creates a new attendee if the passed object
229
- * is not already an [[`ICalAttendee`]].
229
+ * is not already an {@link ICalAttendee}.
230
230
  *
231
231
  * ```javascript
232
232
  * const cal = ical();
@@ -455,7 +455,7 @@ interface ICalAlarmJSONData {
455
455
  }[];
456
456
  }
457
457
  /**
458
- * Usually you get an `ICalAlarm` object like this:
458
+ * Usually you get an {@link ICalAlarm} object like this:
459
459
  *
460
460
  * ```javascript
461
461
  * import ical from 'ical-generator';
@@ -464,7 +464,7 @@ interface ICalAlarmJSONData {
464
464
  * const alarm = event.createAlarm();
465
465
  * ```
466
466
  *
467
- * You can also use the [[`ICalAlarm`]] object directly:
467
+ * You can also use the {@link ICalAlarm} object directly:
468
468
  *
469
469
  * ```javascript
470
470
  * import ical, {ICalAlarm} from 'ical-generator';
@@ -476,11 +476,11 @@ declare class ICalAlarm {
476
476
  private readonly data;
477
477
  private readonly event;
478
478
  /**
479
- * Constructor of [[`ICalAttendee`]]. The event reference is required
479
+ * Constructor of {@link ICalAttendee}. The event reference is required
480
480
  * to query the calendar's timezone and summary when required.
481
481
  *
482
482
  * @param data Alarm Data
483
- * @param calendar Reference to ICalEvent object
483
+ * @param event Reference to ICalEvent object
484
484
  */
485
485
  constructor(data: ICalAlarmData, event: ICalEvent);
486
486
  /**
@@ -489,14 +489,14 @@ declare class ICalAlarm {
489
489
  */
490
490
  type(type: ICalAlarmType): this;
491
491
  /**
492
- * Set the alarm type. See [[`ICalAlarmType`]]
492
+ * Set the alarm type. See {@link ICalAlarmType}
493
493
  * for available status options.
494
494
  * @since 0.2.1
495
495
  */
496
496
  type(): ICalAlarmType;
497
497
  /**
498
498
  * Get the trigger time for the alarm. Can either
499
- * be a date and time value ([[`ICalDateTimeValue`]]) or
499
+ * be a date and time value ({@link ICalDateTimeValue}) or
500
500
  * a number, which will represent the seconds between
501
501
  * alarm and event start. The number is negative, if the
502
502
  * alarm is triggered after the event started.
@@ -556,7 +556,7 @@ declare class ICalAlarm {
556
556
  relatesTo(relatesTo: ICalAlarmRelatesTo | null): this;
557
557
  /**
558
558
  * Get the trigger time for the alarm. Can either
559
- * be a date and time value ([[`ICalDateTimeValue`]]) or
559
+ * be a date and time value ({@link ICalDateTimeValue}) or
560
560
  * a number, which will represent the seconds between
561
561
  * alarm and event start. The number is negative, if the
562
562
  * alarm is triggered before the event started.
@@ -585,7 +585,7 @@ declare class ICalAlarm {
585
585
  triggerAfter(trigger: number | ICalDateTimeValue): this;
586
586
  /**
587
587
  * Get the trigger time for the alarm. Can either
588
- * be a date and time value ([[`ICalDateTimeValue`]]) or
588
+ * be a date and time value ({@link ICalDateTimeValue}) or
589
589
  * a number, which will represent the seconds between
590
590
  * alarm and event start. The number is negative, if the
591
591
  * alarm is triggered after the event started.
@@ -758,12 +758,12 @@ declare class ICalAlarm {
758
758
  interface ICalCategoryData {
759
759
  name: string;
760
760
  }
761
- interface ICalCategoryInternalData {
761
+ interface ICalCategoryJSONData {
762
762
  name: string;
763
763
  }
764
- type ICalCategoryJSONData = ICalCategoryInternalData;
764
+ type ICalCategoryInternalData = ICalCategoryJSONData;
765
765
  /**
766
- * Usually you get an `ICalCategory` object like this:
766
+ * Usually you get an {@link ICalCategory} object like this:
767
767
  *
768
768
  * ```javascript
769
769
  * import ical from 'ical-generator';
@@ -772,7 +772,7 @@ type ICalCategoryJSONData = ICalCategoryInternalData;
772
772
  * const category = event.createCategory();
773
773
  * ```
774
774
  *
775
- * You can also use the [[`ICalCategory`]] object directly:
775
+ * You can also use the {@link ICalCategory} object directly:
776
776
  *
777
777
  * ```javascript
778
778
  * import ical, {ICalCategory} from 'ical-generator';
@@ -783,7 +783,7 @@ type ICalCategoryJSONData = ICalCategoryInternalData;
783
783
  declare class ICalCategory {
784
784
  private readonly data;
785
785
  /**
786
- * Constructor of [[`ICalCategory`]].
786
+ * Constructor of {@link ICalCategory}.
787
787
  * @param data Category Data
788
788
  */
789
789
  constructor(data: ICalCategoryData);
@@ -876,7 +876,7 @@ interface ICalEventJSONData {
876
876
  stamp: string;
877
877
  allDay: boolean;
878
878
  floating: boolean;
879
- repeating: ICalEventInternalRepeatingData | string | null;
879
+ repeating: ICalEventJSONRepeatingData | string | null;
880
880
  summary: string;
881
881
  location: ICalLocation | null;
882
882
  description: ICalDescription | null;
@@ -897,7 +897,7 @@ interface ICalEventJSONData {
897
897
  value: string;
898
898
  }[];
899
899
  }
900
- interface ICalEventInternalRepeatingData {
900
+ interface ICalEventJSONRepeatingData {
901
901
  freq: ICalEventRepeatingFreq;
902
902
  count?: number;
903
903
  interval?: number;
@@ -910,7 +910,7 @@ interface ICalEventInternalRepeatingData {
910
910
  startOfWeek?: ICalWeekday;
911
911
  }
912
912
  /**
913
- * Usually you get an `ICalEvent` object like this:
913
+ * Usually you get an {@link ICalEvent} object like this:
914
914
  * ```javascript
915
915
  * import ical from 'ical-generator';
916
916
  * const calendar = ical();
@@ -982,6 +982,35 @@ declare class ICalEvent {
982
982
  * [Readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
983
983
  * for details about supported values and timezone handling.
984
984
  *
985
+ * ```typescript
986
+ * import ical from 'ical-generator';
987
+ *
988
+ * const cal = ical();
989
+ *
990
+ * const event = cal.createEvent({
991
+ * start: new Date('2020-01-01')
992
+ * });
993
+ *
994
+ * // overwrites old start date
995
+ * event.start(new Date('2024-02-01'));
996
+ *
997
+ * cal.toString();
998
+ * ```
999
+ *
1000
+ * ```text
1001
+ * BEGIN:VCALENDAR
1002
+ * VERSION:2.0
1003
+ * PRODID:-//sebbo.net//ical-generator//EN
1004
+ * BEGIN:VEVENT
1005
+ * UID:7e2aee64-b07a-4256-9b3e-e9eaa452bac8
1006
+ * SEQUENCE:0
1007
+ * DTSTAMP:20240212T190915Z
1008
+ * DTSTART:20240201T000000Z
1009
+ * SUMMARY:
1010
+ * END:VEVENT
1011
+ * END:VCALENDAR
1012
+ * ```
1013
+ *
985
1014
  * @since 0.2.0
986
1015
  */
987
1016
  start(start: ICalDateTimeValue): this;
@@ -1083,6 +1112,36 @@ declare class ICalEvent {
1083
1112
  * event.allDay(true); // → appointment is for the whole day
1084
1113
  * ```
1085
1114
  *
1115
+ * ```typescript
1116
+ * import ical from 'ical-generator';
1117
+ *
1118
+ * const cal = ical();
1119
+ *
1120
+ * cal.createEvent({
1121
+ * start: new Date('2020-01-01'),
1122
+ * summary: 'Very Important Day',
1123
+ * allDay: true
1124
+ * });
1125
+ *
1126
+ * cal.toString();
1127
+ * ```
1128
+ *
1129
+ * ```text
1130
+ * BEGIN:VCALENDAR
1131
+ * VERSION:2.0
1132
+ * PRODID:-//sebbo.net//ical-generator//EN
1133
+ * BEGIN:VEVENT
1134
+ * UID:1964fe8d-32c5-4f2a-bd62-7d9d7de5992b
1135
+ * SEQUENCE:0
1136
+ * DTSTAMP:20240212T191956Z
1137
+ * DTSTART;VALUE=DATE:20200101
1138
+ * X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
1139
+ * X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
1140
+ * SUMMARY:Very Important Day
1141
+ * END:VEVENT
1142
+ * END:VCALENDAR
1143
+ * ```
1144
+ *
1086
1145
  * @since 0.2.0
1087
1146
  */
1088
1147
  allDay(allDay: boolean): this;
@@ -1096,9 +1155,9 @@ declare class ICalEvent {
1096
1155
  * Get the event's repeating options
1097
1156
  * @since 0.2.0
1098
1157
  */
1099
- repeating(): ICalEventInternalRepeatingData | ICalRRuleStub | string | null;
1158
+ repeating(): ICalEventJSONRepeatingData | ICalRRuleStub | string | null;
1100
1159
  /**
1101
- * Set the event's repeating options by passing an [[`ICalRepeatingOptions`]] object.
1160
+ * Set the event's repeating options by passing an {@link ICalRepeatingOptions} object.
1102
1161
  *
1103
1162
  * ```javascript
1104
1163
  * event.repeating({
@@ -1116,12 +1175,84 @@ declare class ICalEvent {
1116
1175
  * });
1117
1176
  * ```
1118
1177
  *
1178
+ * **Example:**
1179
+ *
1180
+ *```typescript
1181
+ * import ical, { ICalEventRepeatingFreq } from 'ical-generator';
1182
+ *
1183
+ * const cal = ical();
1184
+ *
1185
+ * const event = cal.createEvent({
1186
+ * start: new Date('2020-01-01T20:00:00Z'),
1187
+ * summary: 'Repeating Event'
1188
+ * });
1189
+ * event.repeating({
1190
+ * freq: ICalEventRepeatingFreq.WEEKLY,
1191
+ * count: 4
1192
+ * });
1193
+ *
1194
+ * cal.toString();
1195
+ * ```
1196
+ *
1197
+ * ```text
1198
+ * BEGIN:VCALENDAR
1199
+ * VERSION:2.0
1200
+ * PRODID:-//sebbo.net//ical-generator//EN
1201
+ * BEGIN:VEVENT
1202
+ * UID:b80e6a68-c2cd-48f5-b94d-cecc7ce83871
1203
+ * SEQUENCE:0
1204
+ * DTSTAMP:20240212T193646Z
1205
+ * DTSTART:20200101T200000Z
1206
+ * RRULE:FREQ=WEEKLY;COUNT=4
1207
+ * SUMMARY:Repeating Event
1208
+ * END:VEVENT
1209
+ * END:VCALENDAR
1210
+ * ```
1211
+ *
1119
1212
  * @since 0.2.0
1120
1213
  */
1121
1214
  repeating(repeating: ICalRepeatingOptions | null): this;
1122
1215
  /**
1123
1216
  * Set the event's repeating options by passing an [RRule object](https://github.com/jakubroztocil/rrule).
1124
1217
  * @since 2.0.0-develop.5
1218
+ *
1219
+ * ```typescript
1220
+ * import ical from 'ical-generator';
1221
+ * import { datetime, RRule } from 'rrule';
1222
+ *
1223
+ * const cal = ical();
1224
+ *
1225
+ * const event = cal.createEvent({
1226
+ * start: new Date('2020-01-01T20:00:00Z'),
1227
+ * summary: 'Repeating Event'
1228
+ * });
1229
+ *
1230
+ * const rule = new RRule({
1231
+ * freq: RRule.WEEKLY,
1232
+ * interval: 5,
1233
+ * byweekday: [RRule.MO, RRule.FR],
1234
+ * dtstart: datetime(2012, 2, 1, 10, 30),
1235
+ * until: datetime(2012, 12, 31)
1236
+ * })
1237
+ * event.repeating(rule);
1238
+ *
1239
+ * cal.toString();
1240
+ * ```
1241
+ *
1242
+ * ```text
1243
+ * BEGIN:VCALENDAR
1244
+ * VERSION:2.0
1245
+ * PRODID:-//sebbo.net//ical-generator//EN
1246
+ * BEGIN:VEVENT
1247
+ * UID:36585e40-8fa8-460d-af0c-88b6f434030b
1248
+ * SEQUENCE:0
1249
+ * DTSTAMP:20240212T193827Z
1250
+ * DTSTART:20200101T200000Z
1251
+ * RRULE:FREQ=WEEKLY;INTERVAL=5;BYDAY=MO,FR;UNTIL=20121231T000000Z
1252
+ * SUMMARY:Repeating Event
1253
+ * END:VEVENT
1254
+ * END:VCALENDAR
1255
+ * ```
1125
1256
  */
1126
1257
  repeating(repeating: ICalRRuleStub | null): this;
1127
1258
  /**
@@ -1152,7 +1283,7 @@ declare class ICalEvent {
1152
1283
  location(): ICalLocation | null;
1153
1284
  /**
1154
1285
  * Set the event's location by passing a string (minimum) or
1155
- * an [[`ICalLocation`]] object which will also fill the iCal
1286
+ * an {@link ICalLocation} object which will also fill the iCal
1156
1287
  * `GEO` attribute and Apple's `X-APPLE-STRUCTURED-LOCATION`.
1157
1288
  *
1158
1289
  * ```javascript
@@ -1167,11 +1298,20 @@ declare class ICalEvent {
1167
1298
  * });
1168
1299
  * ```
1169
1300
  *
1301
+ * ```text
1302
+ * LOCATION:Apple Store Kurfürstendamm\nKurfürstendamm 26\, 10719 Berlin\,
1303
+ * Deutschland
1304
+ * X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Kurfürstendamm 26\, 10719
1305
+ * Berlin\, Deutschland;X-APPLE-RADIUS=141.1751386318387;X-TITLE=Apple Store
1306
+ * Kurfürstendamm:geo:52.50363,13.32865
1307
+ * GEO:52.50363;13.32865
1308
+ * ```
1309
+ *
1170
1310
  * @since 0.2.0
1171
1311
  */
1172
1312
  location(location: ICalLocation | string | null): this;
1173
1313
  /**
1174
- * Get the event's description as an [[`ICalDescription`]] object.
1314
+ * Get the event's description as an {@link ICalDescription} object.
1175
1315
  * @since 0.2.0
1176
1316
  */
1177
1317
  description(): ICalDescription | null;
@@ -1183,11 +1323,16 @@ declare class ICalEvent {
1183
1323
  *
1184
1324
  * ```javascript
1185
1325
  * event.description({
1186
- * plain: 'Hello World!';
1187
- * html: '<p>Hello World!</p>';
1326
+ * plain: 'Hello World!',
1327
+ * html: '<p>Hello World!</p>'
1188
1328
  * });
1189
1329
  * ```
1190
1330
  *
1331
+ * ```text
1332
+ * DESCRIPTION:Hello World!
1333
+ * X-ALT-DESC;FMTTYPE=text/html:<p>Hello World!</p>
1334
+ * ```
1335
+ *
1191
1336
  * @since 0.2.0
1192
1337
  */
1193
1338
  description(description: ICalDescription | string | null): this;
@@ -1225,19 +1370,40 @@ declare class ICalEvent {
1225
1370
  */
1226
1371
  organizer(organizer: ICalOrganizer | string | null): this;
1227
1372
  /**
1228
- * Creates a new [[`ICalAttendee`]] and returns it. Use options to prefill
1373
+ * Creates a new {@link ICalAttendee} and returns it. Use options to prefill
1229
1374
  * the attendee's attributes. Calling this method without options will create
1230
1375
  * an empty attendee.
1231
1376
  *
1232
1377
  * ```javascript
1378
+ * import ical from 'ical-generator';
1379
+ *
1233
1380
  * const cal = ical();
1234
- * const event = cal.createEvent();
1235
- * const attendee = event.createAttendee({email: 'hui@example.com', name: 'Hui'});
1381
+ * const event = cal.createEvent({
1382
+ * start: new Date()
1383
+ * });
1384
+ *
1385
+ * event.createAttendee({email: 'hui@example.com', name: 'Hui'});
1236
1386
  *
1237
1387
  * // add another attendee
1238
1388
  * event.createAttendee('Buh <buh@example.net>');
1239
1389
  * ```
1240
1390
  *
1391
+ * ```text
1392
+ * BEGIN:VCALENDAR
1393
+ * VERSION:2.0
1394
+ * PRODID:-//sebbo.net//ical-generator//EN
1395
+ * BEGIN:VEVENT
1396
+ * UID:b4944f07-98e4-4581-ac80-2589bb20273d
1397
+ * SEQUENCE:0
1398
+ * DTSTAMP:20240212T194232Z
1399
+ * DTSTART:20240212T194232Z
1400
+ * SUMMARY:
1401
+ * ATTENDEE;ROLE=REQ-PARTICIPANT;CN="Hui":MAILTO:hui@example.com
1402
+ * ATTENDEE;ROLE=REQ-PARTICIPANT;CN="Buh":MAILTO:buh@example.net
1403
+ * END:VEVENT
1404
+ * END:VCALENDAR
1405
+ * ```
1406
+ *
1241
1407
  * As with the organizer, you can also add an explicit `mailto` address.
1242
1408
  *
1243
1409
  * ```javascript
@@ -1273,7 +1439,7 @@ declare class ICalEvent {
1273
1439
  */
1274
1440
  attendees(attendees: (ICalAttendee | ICalAttendeeData | string)[]): this;
1275
1441
  /**
1276
- * Creates a new [[`ICalAlarm`]] and returns it. Use options to prefill
1442
+ * Creates a new {@link ICalAlarm} and returns it. Use options to prefill
1277
1443
  * the alarm's attributes. Calling this method without options will create
1278
1444
  * an empty alarm.
1279
1445
  *
@@ -1315,7 +1481,7 @@ declare class ICalEvent {
1315
1481
  */
1316
1482
  alarms(alarms: ICalAlarm[] | ICalAlarmData[]): this;
1317
1483
  /**
1318
- * Creates a new [[`ICalCategory`]] and returns it. Use options to prefill the category's attributes.
1484
+ * Creates a new {@link ICalCategory} and returns it. Use options to prefill the category's attributes.
1319
1485
  * Calling this method without options will create an empty category.
1320
1486
  *
1321
1487
  * ```javascript
@@ -1633,7 +1799,7 @@ declare enum ICalCalendarMethod {
1633
1799
  DECLINECOUNTER = "DECLINECOUNTER"
1634
1800
  }
1635
1801
  /**
1636
- * Usually you get an `ICalCalendar` object like this:
1802
+ * Usually you get an {@link ICalCalendar} object like this:
1637
1803
  * ```javascript
1638
1804
  * import ical from 'ical-generator';
1639
1805
  * const calendar = ical();
@@ -1648,7 +1814,7 @@ declare enum ICalCalendarMethod {
1648
1814
  declare class ICalCalendar {
1649
1815
  private readonly data;
1650
1816
  /**
1651
- * You can pass options to setup your calendar or use setters to do this.
1817
+ * You can pass options to set up your calendar or use setters to do this.
1652
1818
  *
1653
1819
  * ```javascript
1654
1820
  * * import ical from 'ical-generator';
@@ -1669,6 +1835,16 @@ declare class ICalCalendar {
1669
1835
  * cal.name('sebbo.net');
1670
1836
  * ```
1671
1837
  *
1838
+ * `cal.toString()` would then produce the following string:
1839
+ * ```text
1840
+ * BEGIN:VCALENDAR
1841
+ * VERSION:2.0
1842
+ * PRODID:-//sebbo.net//ical-generator//EN
1843
+ * NAME:sebbo.net
1844
+ * X-WR-CALNAME:sebbo.net
1845
+ * END:VCALENDAR
1846
+ * ```
1847
+ *
1672
1848
  * @param data Calendar data
1673
1849
  */
1674
1850
  constructor(data?: ICalCalendarData);
@@ -1680,7 +1856,7 @@ declare class ICalCalendar {
1680
1856
  /**
1681
1857
  * Set your feed's prodid. `prodid` can be either a
1682
1858
  * string like `//sebbo.net//ical-generator//EN` or a
1683
- * valid [[`ICalCalendarProdIdData`]] object. `language`
1859
+ * valid {@link ICalCalendarProdIdData} object. `language`
1684
1860
  * is optional and defaults to `EN`.
1685
1861
  *
1686
1862
  * ```javascript
@@ -1691,23 +1867,30 @@ declare class ICalCalendar {
1691
1867
  * });
1692
1868
  * ```
1693
1869
  *
1870
+ * `cal.toString()` would then produce the following string:
1871
+ * ```text
1872
+ * PRODID:-//My Company//My Product//EN
1873
+ * ```
1874
+ *
1694
1875
  * @since 0.2.0
1695
1876
  */
1696
1877
  prodId(prodId: ICalCalendarProdIdData | string): this;
1697
1878
  /**
1698
1879
  * Get the feed method attribute.
1699
- * See [[`ICalCalendarMethod`]] for possible results.
1880
+ * See {@link ICalCalendarMethod} for possible results.
1700
1881
  *
1701
1882
  * @since 0.2.8
1702
1883
  */
1703
1884
  method(): ICalCalendarMethod | null;
1704
1885
  /**
1705
1886
  * Set the feed method attribute.
1706
- * See [[`ICalCalendarMethod`]] for available options.
1887
+ * See {@link ICalCalendarMethod} for available options.
1707
1888
  *
1708
1889
  * #### Typescript Example
1709
1890
  * ```typescript
1710
1891
  * import {ICalCalendarMethod} from 'ical-generator';
1892
+ *
1893
+ * // METHOD:PUBLISH
1711
1894
  * calendar.method(ICalCalendarMethod.PUBLISH);
1712
1895
  * ```
1713
1896
  *
@@ -1723,6 +1906,24 @@ declare class ICalCalendar {
1723
1906
  * Set your feed's name. Is used to fill `NAME`
1724
1907
  * and `X-WR-CALNAME` in your iCal file.
1725
1908
  *
1909
+ * ```typescript
1910
+ * import ical from 'ical-generator';
1911
+ *
1912
+ * const cal = ical();
1913
+ * cal.name('Next Arrivals');
1914
+ *
1915
+ * cal.toString();
1916
+ * ```
1917
+ *
1918
+ * ```text
1919
+ * BEGIN:VCALENDAR
1920
+ * VERSION:2.0
1921
+ * PRODID:-//sebbo.net//ical-generator//EN
1922
+ * NAME:Next Arrivals
1923
+ * X-WR-CALNAME:Next Arrivals
1924
+ * END:VCALENDAR
1925
+ * ```
1926
+ *
1726
1927
  * @since 0.2.0
1727
1928
  */
1728
1929
  name(name: string | null): this;
@@ -1745,7 +1946,7 @@ declare class ICalCalendar {
1745
1946
  * Use this method to set your feed's timezone. Is used
1746
1947
  * to fill `TIMEZONE-ID` and `X-WR-TIMEZONE` in your iCal export.
1747
1948
  * Please not that all date values are treaded differently, if
1748
- * a timezone was set. See [[`formatDate`]] for details. If no
1949
+ * a timezone was set. See {@link formatDate} for details. If no
1749
1950
  * time zone is specified, all information is output as UTC.
1750
1951
  *
1751
1952
  * ```javascript
@@ -1776,7 +1977,7 @@ declare class ICalCalendar {
1776
1977
  * import ical from 'ical-generator';
1777
1978
  * import {getVtimezoneComponent} from '@touch4it/ical-timezones';
1778
1979
  *
1779
- * const cal = new ICalCalendar();
1980
+ * const cal = ical();
1780
1981
  * cal.timezone({
1781
1982
  * name: 'FOO',
1782
1983
  * generator: getVtimezoneComponent
@@ -1804,6 +2005,10 @@ declare class ICalCalendar {
1804
2005
  * cal.source('http://example.com/my/original_source.ical');
1805
2006
  * ```
1806
2007
  *
2008
+ * ```text
2009
+ * SOURCE;VALUE=URI:http://example.com/my/original_source.ical
2010
+ * ```
2011
+ *
1807
2012
  * @since 2.2.0-develop.1
1808
2013
  */
1809
2014
  source(source: string | null): this;
@@ -1864,7 +2069,7 @@ declare class ICalCalendar {
1864
2069
  */
1865
2070
  ttl(ttl: number | ICalMomentDurationStub | null): this;
1866
2071
  /**
1867
- * Creates a new [[`ICalEvent`]] and returns it. Use options to prefill the event's attributes.
2072
+ * Creates a new {@link ICalEvent} and returns it. Use options to prefill the event's attributes.
1868
2073
  * Calling this method without options will create an empty event.
1869
2074
  *
1870
2075
  * ```javascript
@@ -1956,6 +2161,14 @@ declare class ICalCalendar {
1956
2161
  * });
1957
2162
  * ```
1958
2163
  *
2164
+ * ```text
2165
+ * BEGIN:VCALENDAR
2166
+ * VERSION:2.0
2167
+ * PRODID:-//sebbo.net//ical-generator//EN
2168
+ * X-MY-CUSTOM-ATTR:1337!
2169
+ * END:VCALENDAR
2170
+ * ```
2171
+ *
1959
2172
  * @since 1.9.0
1960
2173
  */
1961
2174
  x(keyOrArray: {
@@ -1971,6 +2184,14 @@ declare class ICalCalendar {
1971
2184
  * calendar.x("X-MY-CUSTOM-ATTR", "1337!");
1972
2185
  * ```
1973
2186
  *
2187
+ * ```text
2188
+ * BEGIN:VCALENDAR
2189
+ * VERSION:2.0
2190
+ * PRODID:-//sebbo.net//ical-generator//EN
2191
+ * X-MY-CUSTOM-ATTR:1337!
2192
+ * END:VCALENDAR
2193
+ * ```
2194
+ *
1974
2195
  * @since 1.9.0
1975
2196
  */
1976
2197
  x(keyOrArray: string, value: string): this;
@@ -2074,4 +2295,4 @@ declare function foldLines(input: string): string;
2074
2295
  */
2075
2296
  declare function ical(data?: ICalCalendarData): ICalCalendar;
2076
2297
 
2077
- export { ICalAlarm, type ICalAlarmData, type ICalAlarmJSONData, type ICalAlarmRepeatData, ICalAlarmType, type ICalAlarmTypeValue, type ICalAttachment, ICalAttendee, type ICalAttendeeData, type ICalAttendeeJSONData, ICalAttendeeRole, ICalAttendeeStatus, ICalAttendeeType, ICalCalendar, type ICalCalendarData, type ICalCalendarJSONData, ICalCalendarMethod, type ICalCalendarProdIdData, ICalCategory, type ICalCategoryData, type ICalCategoryJSONData, type ICalDateTimeValue, type ICalDayJsStub, type ICalDescription, ICalEvent, ICalEventBusyStatus, ICalEventClass, type ICalEventData, type ICalEventJSONData, ICalEventRepeatingFreq, ICalEventStatus, ICalEventTransparency, type ICalGeo, type ICalLocation, type ICalLuxonDateTimeStub, type ICalMomentDurationStub, type ICalMomentStub, type ICalMomentTimezoneStub, type ICalOrganizer, type ICalRRuleStub, type ICalRepeatingOptions, type ICalTimezone, ICalWeekday, ical as default, escape, foldLines, formatDate, formatDateTZ };
2298
+ export { ICalAlarm, type ICalAlarmBaseData, type ICalAlarmData, type ICalAlarmJSONData, ICalAlarmRelatesTo, type ICalAlarmRepeatData, type ICalAlarmTriggerAfterData, type ICalAlarmTriggerBeforeData, type ICalAlarmTriggerData, ICalAlarmType, type ICalAlarmTypeValue, type ICalAttachment, ICalAttendee, type ICalAttendeeData, type ICalAttendeeJSONData, ICalAttendeeRole, ICalAttendeeStatus, ICalAttendeeType, ICalCalendar, type ICalCalendarData, type ICalCalendarJSONData, ICalCalendarMethod, type ICalCalendarProdIdData, ICalCategory, type ICalCategoryData, type ICalCategoryJSONData, type ICalDateTimeValue, type ICalDayJsStub, type ICalDescription, ICalEvent, ICalEventBusyStatus, ICalEventClass, type ICalEventData, type ICalEventJSONData, type ICalEventJSONRepeatingData, ICalEventRepeatingFreq, ICalEventStatus, ICalEventTransparency, type ICalGeo, type ICalLocation, type ICalLuxonDateTimeStub, type ICalMomentDurationStub, type ICalMomentStub, type ICalMomentTimezoneStub, type ICalOrganizer, type ICalRRuleStub, type ICalRepeatingOptions, type ICalTimezone, ICalWeekday, ical as default, escape, foldLines, formatDate, formatDateTZ };