diff --git a/src/ical.js.d.ts b/src/ical.js.d.ts index a87e499..9dfae0d 100644 --- a/src/ical.js.d.ts +++ b/src/ical.js.d.ts @@ -3,8 +3,12 @@ declare module 'ical.js' { class Component { name: string; + static fromString(str: string): Component; + constructor(jCal: Array | string, parent?: Component); + toJSON(): Array; + getFirstSubcomponent(name?: string): Component | null; getFirstPropertyValue(name?: string): any; diff --git a/src/pim-types.tsx b/src/pim-types.tsx index 29d9eda..55be069 100644 --- a/src/pim-types.tsx +++ b/src/pim-types.tsx @@ -39,6 +39,10 @@ export class ContactType { return this.comp.toString(); } + clone() { + return new ContactType(new ICAL.Component(this.comp.toJSON())); + } + get uid() { return this.comp.getFirstPropertyValue('uid'); }