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

Emit human-readable names for classes, functions, etc. in @internationalized/date package #6808

Open
dcastil opened this issue Jul 31, 2024 · 1 comment

Comments

@dcastil
Copy link

dcastil commented Jul 31, 2024

Provide a general summary of the feature here

Hey everyone, thanks for the @internationalized/date package, I love it!

When inspecting varying class instances during debugging, e.g. by logging to the console, JS engines usually display the name of the class which helps with figuring out what kind of object I'm dealing with.

Screenshot 2024-07-31 at 14 27 26

However, when I inspect objects from the @internationalized/date package, the class names appear as an ID that isn't human-readable. That makes it more difficult to differentiate between object types, especially if their properties are similar like in the case of CalendarDateTime and ZonedDateTime.

Screenshot 2024-07-31 at 14 31 56

Would be awesome if it were possible to preserve the original class names in the bundle to keep them human-readable during runtime inspection.

🤔 Expected Behavior?

Emit human-readable class names in the bundle which leads to human-readable classes during runtime inspection.

😯 Current Behavior

Class names are replaced with long IDs that makes it difficult to differentiate between the different classes.

💁 Possible Solution

Didn't dig too much into it but there is probably an option to preserve names as much as possible in Parcel. I could also look into it deeper if this is desired.

🔦 Context

I use ZonedDateTime and CalendarDate in a codebase and sometimes log those objects to the console during debugging. That results in those IDs being logged and I have to either log additional info or click into every single object to figure out the class the object belongs to.

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@reidbarber
Copy link
Member

Related to #5154

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

No branches or pull requests

2 participants