Skip to content

Type definitions not updated from JSdoc #502

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

Open
willempardaens opened this issue Apr 30, 2025 · 1 comment
Open

Type definitions not updated from JSdoc #502

willempardaens opened this issue Apr 30, 2025 · 1 comment

Comments

@willempardaens
Copy link
Member

willempardaens commented Apr 30, 2025

Trying to resolve a missing type reported here: SAP/openui5#4178 I noticed it was reported to be fixed in the coding (JSdoc), but the type definitions in both @sapui5/types and @types/openui5 do not seem to reflect the changes.

@sapui5/types/sap.m.d.ts:23511:

/**
   * Escape handler for sap.m.Dialog control.
   */
  export type EscapeHandler = (oHandlers: object) => void;

Where object should have been replaced with a different structure

@akudev
Copy link
Contributor

akudev commented May 2, 2025

@willempardaens Hm, in the type definitions diff of 1.134, you can see that the relevant parts of sap.m have changed. Line 23491 of the sap.m types has the EscapeHandler type (which you, by the way, also quote above), and line 23189 (and others) use this type, so in general, the fix has arrived in the types.

But I see, your point is that the structure

{
        resolve: Function;
        reject: Function;
 }

has been simplified to object, although the fix has apparently tried to define the actual structure.

The api.json intermediate file also does contain this structure, so it seems indeed like this hits a spot where the dts-generator does not yet support all possible kinds of input.

Thanks for reporting.

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

2 participants