-
Notifications
You must be signed in to change notification settings - Fork 228
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
LogParser: update types to eliminate the dreaded any
, add Json type
#200
Conversation
|
| boolean | ||
| null | ||
| Json[] | ||
| { [key: string]: Json }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be JSONBlob
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try it and see ;) It'll raise a circular definition error, at least when I did, it did.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah...good point. didn't notice the circular ref. its no big deal. but I'd use Record<string, Json>
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also circular, weirdly enough. It has to be a primitive literal in order to hit the circular reference type edge case.
This is generally fancier parameterized types than I normally use so would appreciate a close inspection on this one, thanks!
Relates to HDX-326