You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have been using version 0.4.2 and are now refactoring our api so we upgraded the package to version 0.6.0 and now a few things are not working anymore.
We are setting a url and also adding a label to it like this:
Now the setProperty does not have the type string anymore for the element rather now the type Element which does not allow to set custom elements like item1URL or item1LABLE. Is there a new way of doing this?
The text was updated successfully, but these errors were encountered:
onevcard-team
changed the title
Setting url label not working after upgrade from 0.4.2 to 0.6.0
URGENT: Setting url label not working after upgrade from 0.4.2 to 0.6.0
Oct 25, 2023
joaocarmo
changed the title
URGENT: Setting url label not working after upgrade from 0.4.2 to 0.6.0
Setting url label not working after upgrade from 0.4.2 to 0.6.0
Mar 9, 2024
Thank you for opening an issue, but keep in mind that labeling as URGENT is not necessary. I work on these projects on my free time, although I try to be as responsive as possible.
I'm not sure what the problem is exactly, but I will take a look.
You are also encouraged to fork the library and create a pull request for any issues you might find.
I believe you may be referring to a TypeScript error due to the Element type being more restrictive. Unfortunately, we need to ensure that we only allow for valid elements to be added. If you wish to bypass this check, you need to explicitly tell TypeScript to ignore it either by (1) casting it to any or (2) using an annotation.
importVCardfrom'vcard-creator'constvCard=newVCard()constid='1234567890'vCard.setProperty('item1URL'asany,// using a non-standard element'item1.URL',`https\\://onevcard.app/v/${id}`,)vCard.setProperty(// @ts-expect-error using a non-standard element'item1LABLE','item1.X-ABLabel','Meine Digitale Visitenkarte',)
Hello,
we have been using version 0.4.2 and are now refactoring our api so we upgraded the package to version 0.6.0 and now a few things are not working anymore.
We are setting a url and also adding a label to it like this:
Now the setProperty does not have the type string anymore for the element rather now the type
Element
which does not allow to set custom elements likeitem1URL
oritem1LABLE
. Is there a new way of doing this?The text was updated successfully, but these errors were encountered: