Open marlo22 opened 1 year ago
Describe the bug The loadImageFromURL method's type suggests that the second parameter (imageName) is optional, but it's required.
loadImageFromURL
imageName
To Reproduce Just use the method and look that TS doesn't complain when we don't pass imageName. If you run the application, it logs an error.
Here, we can see that the function rejects a Promise if imageName is falsy. https://github.com/nhn/tui.image-editor/blob/9ee993e21135a0bdb69d1400b19d89d7e78f7378/apps/image-editor/src/js/imageEditor.js#L751-L754
Expected behavior The imageName parameter in the loadImageFromURL definition is marked as required.
Describe the bug The
loadImageFromURL
method's type suggests that the second parameter (imageName
) is optional, but it's required.To Reproduce Just use the method and look that TS doesn't complain when we don't pass
imageName
. If you run the application, it logs an error.Here, we can see that the function rejects a Promise if
imageName
is falsy. https://github.com/nhn/tui.image-editor/blob/9ee993e21135a0bdb69d1400b19d89d7e78f7378/apps/image-editor/src/js/imageEditor.js#L751-L754Expected behavior The
imageName
parameter in theloadImageFromURL
definition is marked as required.