Skip to content

Commit

Permalink
⚙️ TypeScript Definition FIxes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Oct 4, 2019
1 parent 312e9c6 commit f64e06b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
23 changes: 17 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ declare module 'ical-generator' {
type method = 'PUBLISH' | 'REQUEST' | 'REPLY' | 'ADD' | 'CANCEL' | 'REFRESH' | 'COUNTER' | 'DECLINECOUNTER';
type repeatingFreq = 'SECONDLY' | 'MINUTELY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';
type status = 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED';
type busystatus = 'FREE' | 'TENTATIVE' | 'BUSY' | 'OOF';
type day = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA';
type attendeeRole = 'CHAIR' | 'REQ-PARTICIPANT' | 'OPT_PARTICIPANT' | 'NON-PARTICIPANT';
type attendeeStatus = 'ACCEPTED' | 'TENTATIVE'| 'DECLINED'| 'DELEGATED' | 'NEEDS-ACTION';
Expand Down Expand Up @@ -75,6 +76,7 @@ declare module 'ical-generator' {
attendees?: AttendeeData[];
alarms?: AlarmData[];
status?: string;
busystatus?: string;
timezone?: string;
recurrenceId?: moment.Moment | Date;
}
Expand Down Expand Up @@ -154,8 +156,8 @@ declare module 'ical-generator' {
timezone(timezone: string): ICalCalendar;
url(): string;
url(url: string): ICalCalendar;
calscale(): string;
calscale(scale: string): ICalCalendar;
scale(): string;
scale(scale: string): ICalCalendar;
ttl(): number;
ttl(ttl: number): ICalCalendar;
createEvent(event: EventData): ICalEvent;
Expand All @@ -164,6 +166,7 @@ declare module 'ical-generator' {
save(path: string, cb: Function): ICalCalendar;
saveSync(path: string): number;
serve(response: http.ServerResponse, filename?: string): ICalCalendar;
toURL(): string;
toString(): string;
toJSON(): any;
length(): number;
Expand All @@ -182,14 +185,14 @@ declare module 'ical-generator' {
start(start: string | moment.Moment | Date): ICalEvent;
end(): moment.Moment;
end(end: string | moment.Moment | Date): ICalEvent;
created(): moment.Moment;
created(created: string | moment.Moment | Date): ICalEvent;
lastModified(): moment.Moment;
lastModified(lastModified: string | moment.Moment | Date): ICalEvent;
recurrenceId(): moment.Moment;
recurrenceId(recurrenceId: string | moment.Moment | Date): ICalEvent;
timezone(): string;
timezone(timezone: string): ICalEvent;
stamp(): moment.Moment;
stamp(stamp: string | moment.Moment | Date): ICalEvent;
timestamp(): moment.Moment;
timestamp(stamp: string | moment.Moment | Date): ICalEvent;
allDay(): boolean;
allDay(allDay: boolean): ICalEvent;
floating(): boolean;
Expand Down Expand Up @@ -219,8 +222,14 @@ declare module 'ical-generator' {
categories(categories: CategoryData[]): ICalEvent;
status(): status;
status(status: status): ICalEvent;
busystatus(): busystatus;
busystatus(busystatus: busystatus): ICalEvent;
url(): string;
url(url: string): ICalEvent;
created(): moment.Moment;
created(created: string | moment.Moment | Date): ICalEvent;
lastModified(): moment.Moment;
lastModified(lastModified: string | moment.Moment | Date): ICalEvent;
toJSON(): EventData;
}

Expand All @@ -230,6 +239,8 @@ declare module 'ical-generator' {
name(name: string): ICalAttendee;
email(): string;
email(email: string): ICalAttendee;
mailto(): string;
mailto(mailto: string): ICalAttendee;
role(): attendeeRole;
role(role: attendeeRole): ICalAttendee;
rsvp(): attendeeRsvp;
Expand Down
2 changes: 1 addition & 1 deletion src/attendee.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class ICalAttendee {
* Set/Get the attendee's email address
*
* @param {String} [mailto] Email address
* @since x.x.x TODO: set correct version number
* @since 1.3.0 TODO: set correct version number
* @returns {ICalAttendee|String}
*/
mailto (mailto) {
Expand Down

0 comments on commit f64e06b

Please sign in to comment.