-
-
Notifications
You must be signed in to change notification settings - Fork 5
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: export RegExpSyntaxError
#144
feat: export RegExpSyntaxError
#144
Conversation
This would also export the public constructor of |
Yeah, I think we need to change the constructor to a factory method and not export the factory method from like: export class RegExpSyntaxError extends SyntaxError {
public index: number
}
export function newRegExpSyntaxError(
srcCtx: RegExpValidatorSourceContext,
flags: { unicode: boolean; unicodeSets: boolean },
index: number,
message: string,
): RegExpSyntaxError {
// ...
} |
RegExpSyntaxError
Sorry the delay, I've updated the PR |
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.
LGTM!
🎉 This PR is included in version 4.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This allows to safely access the index of the error in a try catch