ical.js types: fix ICAL.Recur's type and adjust code accordingly

master
Tom Hacohen 5 years ago
parent dfe5518f38
commit 116883e207

@ -107,7 +107,7 @@ class EventEdit extends React.PureComponent<PropsType> {
this.state.location = event.location ? event.location : '';
this.state.description = event.description ? event.description : '';
this.state.timezone = event.timezone;
this.state.rrule = this.props.item?.component.getFirstPropertyValue('rrule');
this.state.rrule = this.props.item?.component.getFirstPropertyValue<ICAL.Recur>('rrule')?.toJSON();
} else {
this.state.uid = uuid.v4();
}

@ -173,7 +173,8 @@ declare module 'ical.js' {
public bysetpos?: number[];
}
export class Recur extends RecurData {
export class Recur {
constructor(data?: RecurData);
public toJSON(): RecurData;
}
}

Loading…
Cancel
Save