Open neoruien opened 9 months ago
Hello @neoruien , Thank you for sharing this finding. I've created an internal incident DINC0049163. The status of the issue will be updated here in GitHub. Regards, Lidiya
Hello, unfortunately it is a bigger topic to improve the JSDoc in the area of Formatters and Format options to properly support typescript. There is already a backlog item for this topic (CPOUI5MODELS-1111). Regards, Sven
OpenUI5 version: 1.120.2
Browser/version (+device/version):
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
What is the expected result?
What happens instead?
Any other information? (attach screenshot if possible)
For context, I am working on a UI5 project in typescript.
I want to format file size into 2 decimal places, so I referenced the online example:
I typed
FileSizeFormat.getInstance({ decimals: 2 }).format(1048576)
into my code. But I got the error:I have to suppress the Typescript warning by adding this line:
I know that
decimals: 2
works, because without it, the file size gets formatted to1.048576 MB
. But when I include it, the file size is correctly formatted to1.05 MB
. This might be a simple missing documentation issue.