ContactType: Add a way to clone.
parent
6d76559d08
commit
daf27ca517
|
@ -3,8 +3,12 @@ declare module 'ical.js' {
|
|||
class Component {
|
||||
name: string;
|
||||
|
||||
static fromString(str: string): Component;
|
||||
|
||||
constructor(jCal: Array<any> | string, parent?: Component);
|
||||
|
||||
toJSON(): Array<any>;
|
||||
|
||||
getFirstSubcomponent(name?: string): Component | null;
|
||||
|
||||
getFirstPropertyValue(name?: string): any;
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue