Skip to content

Commit 3b0368b

Browse files
committed
fix: type errors
1 parent 4e67324 commit 3b0368b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/parser/extend-parser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function getParser(): typeof Parser {
2323
}
2424

2525
parserCache = class ExtendParser
26-
// @ts-expect-error -- Ignore
2726
extends getAcorn().Parser
2827
{
2928
private [PRIVATE]: {
@@ -180,7 +179,6 @@ export function getParser(): typeof Parser {
180179
/** Get extend parser */
181180
export function getAnyTokenErrorParser(): typeof Parser {
182181
const parser = class ExtendParser
183-
// @ts-expect-error -- Ignore
184182
extends getParser()
185183
{
186184
public constructor(options: Options, code: string, pos: number) {

src/parser/validate.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,9 @@ function validateBinaryExpressionNode(
506506
) {
507507
throw throwOperatorError();
508508
}
509+
if(left.type === 'PrivateIdentifier') {
510+
throw throwUnexpectedNodeError(left, tokens);
511+
}
509512
validateExpr(left, throwOperatorError);
510513
validateExpr(right, () => throwUnexpectedNodeError(right, tokens));
511514

0 commit comments

Comments
 (0)