From 822b5c0c7fdf0c890c8b474ab12cbc1d8b1bf79b Mon Sep 17 00:00:00 2001 From: jannikac Date: Fri, 12 Apr 2024 13:18:17 +0200 Subject: [PATCH] updated component to work correctly with generated d.ts --- lib/ical/component.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/ical/component.js b/lib/ical/component.js index 4e25980d..d4969f2d 100644 --- a/lib/ical/component.js +++ b/lib/ical/component.js @@ -18,11 +18,10 @@ const COMPONENT_INDEX = 2; * properties. * * @class - * @alias ICAL.Component */ class Component { /** - * Create an {@link ICAL.Component} by parsing the passed iCalendar string. + * Create an {@link Component} by parsing the passed iCalendar string. * * @param {String} str The iCalendar string to parse */ @@ -31,11 +30,11 @@ class Component { } /** - * Creates a new ICAL.Component instance. + * Creates a new Component instance. * * @param {Array|String} jCal Raw jCal component data OR name of new * component - * @param {ICAL.Component} parent Parent component to associate + * @param {Component} parent Parent component to associate */ constructor(jCal, parent) { if (typeof(jCal) === 'string') { @@ -143,7 +142,7 @@ class Component { * Finds first sub component, optionally filtered by name. * * @param {String=} name Optional name to filter by - * @return {?ICAL.Component} The found subcomponent + * @return {?Component} The found subcomponent */ getFirstSubcomponent(name) { if (name) { @@ -171,7 +170,7 @@ class Component { * Finds all sub components, optionally filtering by name. * * @param {String=} name Optional name to filter by - * @return {ICAL.Component[]} The found sub components + * @return {Component[]} The found sub components */ getAllSubcomponents(name) { let jCalLen = this.jCal[COMPONENT_INDEX].length; @@ -359,8 +358,8 @@ class Component { /** * Adds a single sub component. * - * @param {ICAL.Component} component The component to add - * @return {ICAL.Component} The passed in component + * @param {Component} component The component to add + * @return {Component} The passed in component */ addSubcomponent(component) { if (!this._components) { @@ -383,7 +382,7 @@ class Component { * Removes a single component by name or the instance of a specific * component. * - * @param {ICAL.Component|String} nameOrComp Name of component, or component + * @param {Component|String} nameOrComp Name of component, or component * @return {Boolean} True when comp is removed */ removeSubcomponent(nameOrComp) {