-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(ts/fast-strip): Distinguish invalid vs unsupported #9846
Conversation
🦋 Changeset detectedLatest commit: 050b9ae The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #9846 will not alter performanceComparing Summary
|
So when it has unsupported syntax it will have the label |
@marco-ippolito Is it fine to throw an object? I think (Not sure if it supports throwing them, though) |
I think so since we always wrap what is thrown into a Node error. Let's give it a try |
@marco-ippolito Can you take a look on the new error output? |
So I'd expect always an object with |
Yeap, I added some test cases |
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.
Thanks for adding the new tests.
My comments are non-blocking.
,-[5:1] | ||
4 | class Foo { | ||
5 | constructor(public id: string) { } | ||
: ^^^^^^^^^^ |
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.
The ^^^ should point to the public
keyword only.
Is this change included in the latest nightly? |
I triggered a full publish action for https://github.com/swc-project/swc/actions/runs/12703698875 |
@marco-ippolito It's published |
Description:
I tried adding a property to the error thrown, but
wasm_bindgen
does not support adding property to an error nor creating different kinds of errors.So I throw an object with
code
andmessage
instead.