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

Suggesting array of categories and string union for LogCategory #6535

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

kraenhansen
Copy link
Member

What, How & Why?

This PR is a suggestion to address this comment: #6512 (comment)

Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

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

It gives good intellisense 👌 And since the addition of duplicate names does not seem unlikely, it could be good to incorporate this change to prevent future breaking changes. It didn't look like the LOG_CATEGORIES array was publicly exported, which I think is probably important (to not have exported) since users may start relying on the indices which would also break with added categories.

* });
*/
static setLogger(loggerCallback: LoggerCallback1): void;
static setLogger(loggerCallback: LoggerCallback2): void;
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm moving this up to improve DX by hitting this as the default overload.

Screenshot 2024-03-05 at 15 24 52

Copy link
Member Author

Choose a reason for hiding this comment

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

But that could be considered breaking 😬

Screenshot_2024-03-05-16-54-38-91_40deb401b9ffe8e1df2f1cc5ba480b12~2

@kraenhansen kraenhansen force-pushed the kh/realm-core-14.0.1-feedback-2 branch from b000df9 to 5410e91 Compare March 6, 2024 09:12
@kneth kneth merged commit 34729fd into kneth/realm-core-14.0.1 Mar 6, 2024
31 checks passed
@kneth kneth deleted the kh/realm-core-14.0.1-feedback-2 branch March 6, 2024 09:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants