Skip to content
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

Make ParseError Much Simpler now that we can use TypeScript #14796

Merged
merged 8 commits into from
Jul 25, 2022
Prev Previous commit
Next Next commit
Fix lint error.
Reviewed by @tolmasky.
  • Loading branch information
tolmasky committed Jul 25, 2022
commit 14e7796d2576e02fe06d724c32557a98f3c71004
5 changes: 4 additions & 1 deletion packages/babel-parser/src/parse-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ function toParseErrorConstructor<ErrorDetails>({
};
}

type ParseErrorTemplate = string | ToMessage<any> | { message: string | ToMessage<any> };
type ParseErrorTemplate =
| string
| ToMessage<any>
| { message: string | ToMessage<any> };

type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };

Expand Down