Skip to content

Commit

Permalink
fix: Type fixes and updates (#217)
Browse files Browse the repository at this point in the history
* Types: add rsvp to AttendeeData

* Types: specify possible values for status and busystatus

* Types: specify possible values for transparency
  • Loading branch information
joelmukuthu authored Nov 12, 2020
1 parent 9bff437 commit d8abe4d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ declare module 'ical-generator' {
type repeatingFreq = 'SECONDLY' | 'MINUTELY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';
type status = 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED';
type busystatus = 'FREE' | 'TENTATIVE' | 'BUSY' | 'OOF';
type transparency = 'OPAQUE' | 'TRANSPARENT';
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 @@ -76,11 +77,11 @@ declare module 'ical-generator' {
organizer?: string | PersonData;
attendees?: AttendeeData[];
alarms?: AlarmData[];
status?: string;
busystatus?: string;
status?: status;
busystatus?: busystatus;
timezone?: string;
recurrenceId?: moment.Moment | Date | string;
transparency?: string;
transparency?: transparency;
x?: { key: string, value: string }[];
}

Expand Down Expand Up @@ -110,6 +111,7 @@ declare module 'ical-generator' {
role?: attendeeRole;
status?: attendeeStatus;
type?: attendeeType;
rsvp?: attendeeRsvp,
delegatedTo?: ICalAttendee;
delegatedFrom?: ICalAttendee;
delegatesTo?: ICalAttendee;
Expand Down Expand Up @@ -244,8 +246,8 @@ declare module 'ical-generator' {
lastModified(): moment.Moment;
lastModified(lastModified: string | moment.Moment | Date): ICalEvent;
toJSON(): EventData;
transparency(): string;
transparency(transparency: string): string;
transparency(): transparency;
transparency(transparency: transparency): string;
}

class ICalAttendee {
Expand Down

0 comments on commit d8abe4d

Please sign in to comment.