Skip to content
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

Merged
merged 8 commits into from Jan 12, 2024

Conversation

jaggederest
Copy link
Contributor

This is generally fancier parameterized types than I normally use so would appreciate a close inspection on this one, thanks!

Relates to HDX-326

Copy link

changeset-bot bot commented Jan 8, 2024

⚠️ No Changeset found

Latest commit: cab0e18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

| boolean
| null
| Json[]
| { [key: string]: Json };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be JSONBlob

Copy link
Contributor Author

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.

Copy link
Contributor

@wrn14897 wrn14897 Jan 9, 2024

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

Copy link
Contributor Author

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.

wrn14897
wrn14897 previously approved these changes Jan 12, 2024
@jaggederest jaggederest merged commit 3311001 into main Jan 12, 2024
4 checks passed
@jaggederest jaggederest deleted the jag/logparser_types branch January 12, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants