-
Notifications
You must be signed in to change notification settings - Fork 7
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
Typescript return string or undefined? #10
Comments
We'd be happy to contribute a fix PR, but just wanted to get your thoughts on this in case we were missing anything! |
I did some tests and could find 2 cases where it returned undefined.
@cyberphone do you know? |
I wonder if there's a way to more generic TS implemenetnation for this method such that based on the input type the expected outputs change. For example, if I passed in an object I guess the default |
Hi @erdtman, the RFC does the assumption that the data to be canonicalized is JSON-serializable (in a generic fashion rather than JavaScript-specific), which excludes I don't have any opinion on things that are platform-specific but if there was a |
Hi, I have read through your package and source code, and I'm wondering in what situation the
serialize
method will returnundefined
. Based on the type definition that is shown in this link, it seems like the output for typescript is shown asstring | undefined
.However, when I compare this to the javascript implementation in this file, it appears this method can only return as a string.
Thank you for your contribution! :)
The text was updated successfully, but these errors were encountered: