SAP / ui5-typescript

Tooling to enable TypeScript support in SAPUI5/OpenUI5 projects
https://sap.github.io/ui5-typescript
Apache License 2.0
200 stars 28 forks source link

Controls are missing members of base classes #389

Closed BenReim closed 1 year ago

BenReim commented 1 year ago

Describe the bug

    const myDateTimePicker = /**@type {import('sap/m/DateTimePicker').default} */ (this.byId("dateTimePicker"));

    // Property 'setMaxDate' does not exist on type 'DateTimePicker'. Did you mean 'getMaxDate' ?ts(2551)
    myDateTimePicker.setMaxDate(new Date());

Additional context "@sapui5/ts-types-esm": "^1.111.0"

codeworrior commented 1 year ago

That's an issue in the sources of sap/m/DatePicker.js. It documents the methods setMin/MaxDate, but without marking them as @public. This essentially makes them @private in UI5, therefore they're not included in the type definitions.

Would you please open an issue in openui5? Colleagues have to fix their JSDoc.

BenReim commented 1 year ago

Sure, I have created the following issue: https://github.com/SAP/openui5/issues/3709