Skip to content

Commit 099225a

Browse files
armano2bradzacher
authored andcommitted
fix(typescript-estree): correct type of key for base nodes (#1367)
1 parent bd0276b commit 099225a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/typescript-estree/src/ts-estree/ts-estree.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ interface ClassDeclarationBase extends BaseNode {
521521

522522
/** this should not be directly used - instead use ClassPropertyComputedNameBase or ClassPropertyNonComputedNameBase */
523523
interface ClassPropertyBase extends BaseNode {
524-
key: PropertyNameComputed | PropertyNameComputed;
524+
key: PropertyName;
525525
value: Expression | null;
526526
computed: boolean;
527527
static: boolean;
@@ -591,7 +591,7 @@ interface MemberExpressionNonComputedNameBase extends MemberExpressionBase {
591591

592592
/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */
593593
interface MethodDefinitionBase extends BaseNode {
594-
key: PropertyNameComputed | PropertyNameComputed;
594+
key: PropertyName;
595595
value: FunctionExpression | TSEmptyBodyFunctionExpression;
596596
computed: boolean;
597597
static: boolean;
@@ -613,7 +613,7 @@ interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
613613

614614
interface PropertyBase extends BaseNode {
615615
type: AST_NODE_TYPES.Property;
616-
key: PropertyNameComputed | PropertyNameNonComputed;
616+
key: PropertyName;
617617
value: Expression | AssignmentPattern | BindingName;
618618
computed: boolean;
619619
method: boolean;
@@ -638,7 +638,7 @@ interface TSHeritageBase extends BaseNode {
638638

639639
interface TSMethodSignatureBase extends BaseNode {
640640
type: AST_NODE_TYPES.TSMethodSignature;
641-
key: PropertyNameComputed | PropertyNameNonComputed;
641+
key: PropertyName;
642642
computed: boolean;
643643
params: Parameter[];
644644
optional?: boolean;
@@ -652,7 +652,7 @@ interface TSMethodSignatureBase extends BaseNode {
652652

653653
interface TSPropertySignatureBase extends BaseNode {
654654
type: AST_NODE_TYPES.TSPropertySignature;
655-
key: PropertyNameComputed | PropertyNameNonComputed;
655+
key: PropertyName;
656656
optional?: boolean;
657657
computed: boolean;
658658
typeAnnotation?: TSTypeAnnotation;

0 commit comments

Comments
 (0)