Skip to content

Commit 3baeec5

Browse files
authored
Chores: Add private-fields-in-in AST to typings (#1564)
1 parent ee23408 commit 3baeec5

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

lib/rules/require-valid-default-prop.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ module.exports = {
427427
}
428428
}
429429
},
430-
onDefinePropsExit(node) {
430+
onDefinePropsExit() {
431431
scriptSetupPropsContexts.pop()
432432
}
433433
})

typings/eslint-plugin-vue/util-types/ast/es-ast.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,21 @@ export type BinaryOperator =
441441
| 'in'
442442
| 'instanceof'
443443
| '**'
444-
export interface BinaryExpression extends HasParentNode {
444+
interface BinaryExpressionWithoutIn extends HasParentNode {
445445
type: 'BinaryExpression'
446-
operator: BinaryOperator
446+
operator: Exclude<BinaryOperator, 'in'>
447447
left: Expression
448448
right: Expression
449449
}
450+
interface BinaryExpressionWithIn extends HasParentNode {
451+
type: 'BinaryExpression'
452+
operator: 'in'
453+
left: Expression | PrivateIdentifier
454+
right: Expression
455+
}
456+
export type BinaryExpression =
457+
| BinaryExpressionWithoutIn
458+
| BinaryExpressionWithIn
450459
export type AssignmentOperator =
451460
| '='
452461
| '+='

0 commit comments

Comments
 (0)