This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
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.
Rest of AggregateError spec #37
Rest of AggregateError spec #37
Changes from 13 commits
5e0c185
df78799
79d9bf8
6389a45
165c5a1
8811f9e
e8632b2
f42c80e
07624af
51f3dfc
b2e5483
d66f4d8
235da75
12f2e1a
0c9ca6d
651fbfb
430cf09
57c2e1d
a4e1b61
d396a83
a2eb792
1d16f24
f5431d2
c3e8e2e
44b1c52
8b9064c
d628750
43ffa4c
2fa9b4d
a617313
8ad81ad
2474cfd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why is aggregate error not just another one of the native error types?
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.
AggregateError has different constructor behavior than NativeErrors as @bakkot mention in #27
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.
Hmm, I’m not sure that suggestion is in fact the best solution - it ends up duplicating a lot of spec text. Is there a way we could modify the NativeError approach so it could handle AggregateErrors?
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.
I think that it's possible. Will try to figure out
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.
repeating: there must not be a mutable object data property on the prototype.
AggregateError.prototype.errors
must either be absent, a primitive, an accessor that returns a new array every time (either empty, or with the errors if #38 moves forward), or a data property using a frozen array.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.
Should it be added to
Properties of the _AggregateError_ Prototype Object
part?