adamgibbons / ics

iCalendar (ics) file generator for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValidationError on alarm passed

DanielNoveo opened this issue · comments

I am not able to pass a description into alarm object
image

And this field also is not described on Alarm interface
image

But compiled JS seems trying to concat it
image

Result ICS alarm:

BEGIN:VALARM
ACTION:DISPLAY
REPEAT:1
TRIGGER:-PT1M
END:VALARM

ICS validator output (https://icalendar.org/validator.html):
image

Same for me, did you find any solution for this?

Same for me, did you find any solution for this?

Do not even tried bro. I think it is lib issue)

I've made a PR tackling this issue (#220). But in the case it's not merged, a hack-around like this could help:

const myAlarm: Alarm & { description?: string } = {
  action: "display",
  description: "Starts in 10 minutes",
  trigger: {
    minutes: 10,
    before: true,
  },
};