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

API: Improve built-in print APIs when printing Promise objects #1710

Conversation

catloversg
Copy link
Contributor

@catloversg catloversg commented Oct 21, 2024

When the player prints Promise objects, those objects are serialized into {}. This may be confusing in some cases. This PR adds a special case in argsToString to handle this situation.

Closes #1706.

Before:
before

After:
after

@d0sboots
Copy link
Collaborator

Adding a replacer also gives us a hook to add printing for Sets/Maps if we want to add that later.

@d0sboots d0sboots merged commit 867f79c into bitburner-official:dev Oct 22, 2024
6 checks passed
@catloversg catloversg deleted the pull-request/api/improve-built-in-print-apis-when-printing-promise-objects branch October 22, 2024 05:22
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.

API: ns.singularity.getCurrentWork().completion (when grafting) returns an empty object.
2 participants