Skip to content

Commit

Permalink
fix: checking private identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed May 4, 2023
1 parent 2da9703 commit b56606b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/checker.ts
Expand Up @@ -175,7 +175,7 @@ export function checkNode(node: ts.Node | undefined, context: FileContext): void
collectData(node, context)
return
}
if (ts.isIdentifier(node)) {
if (ts.isIdentifier(node) || ts.isPrivateIdentifier?.(node)) {
if (context.catchVariables[node.escapedText as string]) {
return
}
Expand Down Expand Up @@ -740,7 +740,6 @@ const skippedNodeKinds = new Set([
ts.SyntaxKind.AmpersandAmpersandEqualsToken,
ts.SyntaxKind.QuestionQuestionEqualsToken,
ts.SyntaxKind.CaretEqualsToken,
ts.SyntaxKind.PrivateIdentifier,
ts.SyntaxKind.BreakKeyword,
ts.SyntaxKind.CaseKeyword,
ts.SyntaxKind.CatchKeyword,
Expand Down

0 comments on commit b56606b

Please sign in to comment.