Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: use es2021 as a target for TypeScript #900

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Conversation

Lodin
Copy link
Contributor

@Lodin Lodin commented Nov 7, 2024

Fixes #897

@Lodin Lodin requested a review from platosha November 7, 2024 09:17
Comment on lines 92 to 93
expect(error.cause).to.be.an('error');
expect(error.cause).to.have.property('message').that.equals('custom');
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the assertion and add the cause back somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I just provide that es2022 TS code here then? As a kind of TS polyfill?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think, restoring cause as a custom property in ResolutionError is a good option.

Comment on lines 92 to 93
expect(error.cause).to.be.an('error');
expect(error.cause).to.have.property('message').that.equals('custom');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think, restoring cause as a custom property in ResolutionError is a good option.

@platosha platosha merged commit 7e87b3b into main Nov 7, 2024
2 checks passed
@platosha platosha deleted the fix/error-options branch November 7, 2024 11:31
Lodin added a commit that referenced this pull request Nov 13, 2024
* fix: use es2021 as a target for TypeScript

* fix: get rid of es2022 code

* fix: restore error.cause

---------

Co-authored-by: Anton Platonov <platosha@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find name 'ErrorOptions' with version 2
2 participants