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

Improve JS compatibility by using types that are supported by JS #44

Open
hnorkowski opened this issue May 17, 2024 · 1 comment
Open
Labels
component: watermarker Watermarker Library feature New feature or request refactor Refactor the code

Comments

@hnorkowski
Copy link
Contributor

🚀 Feature Request

Current Problem

Some of the types we expose are not supported by JavaScript. These types can only be passed to other functions that take them as arguments, but it is not possible to access or modify their data.

Proposed Solution

To improve the usability of our library in JavaScript it should be evaluated if some unsupported types can be replaced by supported types.

Additional Context

Such a change was already done by changing the type of placement in TextWatermarker from Sequence<..> to List<..> (see here)

Related: #40

@hnorkowski hnorkowski added feature New feature or request component: watermarker Watermarker Library refactor Refactor the code labels May 17, 2024
@hnorkowski hnorkowski self-assigned this May 17, 2024
@hnorkowski
Copy link
Contributor Author

It seems like using toList() is not sufficient. If the list is empty an EmptyList type is return which is not supported by JS. For compatibility with not only JS but also Java we should consider changing all types involving lists to Array or ArrayList. These types seem to be fully supported by JS and Java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: watermarker Watermarker Library feature New feature or request refactor Refactor the code
Projects
None yet
Development

No branches or pull requests

1 participant