You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is the Evalulate function limited to returning a number (i am using typescript) and not any object? I would like to calculate the difference between 2 dates and write my own DATEADD and DATEDIFF functions.
Is this not possible in this library?
The text was updated successfully, but these errors were encountered:
The support for objects is very limited at the moment, but technically there's nothing preventing you from returning one from an expression other than the TypeScript type definition. There's just not much you can do with them within an expression other than passing them to or returning them from custom functions.
I haven't used TypeScript personally, so there's a good chance the type definitions are wrong in other places as well. It's something I'm hoping to address with the next major version, since fixing it will probably involve breaking changes.
I'm not familiar enough with TypeScript to offer a good workaround, so forking the project and changing the return type to any might be the best alternative until it's fixed.
Why is the Evalulate function limited to returning a number (i am using typescript) and not any object? I would like to calculate the difference between 2 dates and write my own DATEADD and DATEDIFF functions.
Is this not possible in this library?
The text was updated successfully, but these errors were encountered: