jens-maus / node-ical

NodeJS class for parsing iCalendar/ICS files
Apache License 2.0
118 stars 50 forks source link

Incorrect type for summary field of VEvent type. #266

Open gabibianconi opened 1 year ago

gabibianconi commented 1 year ago

The interface is like

 export interface VEvent extends BaseComponent {
    type: 'VEVENT';
    summary: string;
    ...
  }

but it should be like:

 export interface VEvent extends BaseComponent {
    type: 'VEVENT';
    summary: { params: {ENCODING: string}, val: string};
    ...
  }

This is a log of a VEvent event:

{
  type: 'VEVENT',
  params: [],
  dtstamp: 2023-05-11T13:11:58.000Z,
  lastmodified: 2023-05-11T13:11:13.000Z,
  created: 2023-05-11T15:00:00.000Z,
  sequence: '1',
  organizer: { params: { CN: 'Something' }, val: 'https://some.url.edu/something/' },
  contact: 'https://some.url.edu/something/rsvp_boot?id=123#event_host',
  categories: [ 'SOMETHING', 'Something/Otherthing' ],
  start: 2023-04-23T16:00:00.000Z { tz: 'Etc/UTC' },
  datetype: 'date-time',
  end: 2023-04-23T19:00:00.000Z { tz: 'Etc/UTC' },
  uid: 'abc1232023_10:11:12_AM@something.com',
  summary: {
    params: { ENCODING: 'QUOTED-PRINTABLE' },
    val: 'A string string string'
  },
  location: 'The location',
  url: 'https://some.url.edu/rsvp?id=123',
  description: 'Description'
}
gabibianconi commented 2 weeks ago

+1