Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlanningCalendar type information is wrong #4174

Open
martin-d-aleksandrov opened this issue Dec 17, 2024 · 3 comments
Open

PlanningCalendar type information is wrong #4174

martin-d-aleksandrov opened this issue Dec 17, 2024 · 3 comments

Comments

@martin-d-aleksandrov
Copy link

The type information of PlanningCalendar.getSelectedAppointment() method is defined as

 /**
     * Holds the selected appointments. If no appointments are selected, an empty array is returned.
     *
     * @since 1.54
     *
     * @returns Array of IDs of selected appointments
     */
    getSelectedAppointments(): CalendarAppointment[];

Although, the method return type is declared as an array of CalendarAppoinments, in runtime it actually returns an array of strings, representing the controls' ids

@ndeshev ndeshev self-assigned this Dec 17, 2024
@ndeshev
Copy link
Contributor

ndeshev commented Dec 17, 2024

Hello @martin-d-aleksandrov in the function description it is stated that it returns an array of ID's of the selected appointments in order for the return array type to be more clear.

@ndeshev ndeshev closed this as completed Dec 17, 2024
@ndeshev ndeshev removed their assignment Dec 17, 2024
@codeworrior
Copy link
Member

@ndeshev I think, @martin-d-aleksandrov is complaining about the generated typescript types, they don't match the runtime behaviour of the method. And this is caused by the wrong JSDoc type info here.

Should be

 * @returns {sap.ui.core.ID[]} Array of IDs of selected appointments

@codeworrior codeworrior reopened this Dec 17, 2024
@ndeshev
Copy link
Contributor

ndeshev commented Dec 17, 2024

I've created an internal incident DINC0364557 for an update of the documentation. The status of the issue will be updated here in GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants