Improve UI.Popup TypeScript definitions

WebViewer Version: 8.7.0

“No” to all of these questions:

  • Do you have an issue with a specific file(s)?
  • Can you reproduce using one of our samples or online demos?
  • Are you using the WebViewer server?
  • Does the issue only happen on certain browsers?
  • Is your issue related to a front-end framework?

Is your issue related to annotations? Yes

Do you have any plans to improve the TypeScript definitions for the UI.Popup method arguments? For example, instead of add(items: object[]), it would be more helpful to include a specific items interface that clarifies the shape of header items.

add() in particular should also take in a single object, not an array.

Hello nick,

Thank you for your suggestions! I will add an item to our backlog to improve this definition and others like it that could be unclear.

The documentation for add() also doesn’t clearly show that the items parameter can take either a single object OR an array of objects but it is able to take either of them so you can pass it an array as well and it should add all objects in the array.

Best Regards,
Carlo Mendoza
Software Developer
PDFTron Systems, Inc.

1 Like