forked from vultix/ts-results
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Upgrade the expected runtime environment to es2022 #19
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We need TypeScript 4.6+ to be able to construct Error objects with the cause property[1]. The property is useful to chain errors and, on the catching side, to see what error caused the error we just caught. I want to have this in place to implement [3] which satisfies a need we ourselves have[4]. tslib upgraded in lockstep because otherwise we get FAIL test/result.test.ts ● Test suite failed to run test/result.test.ts:121:29 - error TS2807: This syntax requires an imported helper named '__spreadArray' with 3 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'. 121 const all4 = Result.all(...([] as Result<string, number>[])); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error [2] microsoft/TypeScript#45167 [3] vultix#34 [4] vultix#48
Running npm install using NPM 8.5.5 with unchanged package.json generates a different package-lock.json, let's commit this to avoid spurious changes/conflicts in the future.
I want to have this in place to implement [1] which satisfies a need we ourselves have[2]. This is needed because the cause property is only availble in the es2022 TS profile[3]. [1] vultix#34 [2] vultix#48 [3] microsoft/TypeScript#47020
jstasiak
requested review from
a team,
rbruggem,
raguiar9080 and
festinaj
and removed request for
a team
March 29, 2022 12:15
This reverts commit bba0ee0.
raguiar9080
approved these changes
Mar 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
jstasiak
added a commit
that referenced
this pull request
Mar 29, 2022
This is useful to get access to the "underlying" error in global exception-handling code for example. Feature requested in [1] and I had a question about something similar as well[2]. [1] vultix#34 [2] vultix#48 This change depends on #17 and #19 to be merged first (then the branch will be updated to contain these changes and the build will succeed).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want to have this in place to implement [1] which satisfies a need we
ourselves have[2]. This is needed because the cause property is only
availble in the es2022 TS profile[3].
[1] vultix#34
[2] vultix#48
[3] microsoft/TypeScript#47020