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

fix(typescript-estree): correct type of key for base nodes #1367

Merged
merged 1 commit into from Dec 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/typescript-estree/src/ts-estree/ts-estree.ts
Expand Up @@ -521,7 +521,7 @@ interface ClassDeclarationBase extends BaseNode {

/** this should not be directly used - instead use ClassPropertyComputedNameBase or ClassPropertyNonComputedNameBase */
interface ClassPropertyBase extends BaseNode {
key: PropertyNameComputed | PropertyNameComputed;
armano2 marked this conversation as resolved.
Show resolved Hide resolved
key: PropertyName;
value: Expression | null;
computed: boolean;
static: boolean;
Expand Down Expand Up @@ -591,7 +591,7 @@ interface MemberExpressionNonComputedNameBase extends MemberExpressionBase {

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

interface PropertyBase extends BaseNode {
type: AST_NODE_TYPES.Property;
key: PropertyNameComputed | PropertyNameNonComputed;
key: PropertyName;
value: Expression | AssignmentPattern | BindingName;
computed: boolean;
method: boolean;
Expand All @@ -638,7 +638,7 @@ interface TSHeritageBase extends BaseNode {

interface TSMethodSignatureBase extends BaseNode {
type: AST_NODE_TYPES.TSMethodSignature;
key: PropertyNameComputed | PropertyNameNonComputed;
key: PropertyName;
computed: boolean;
params: Parameter[];
optional?: boolean;
Expand All @@ -652,7 +652,7 @@ interface TSMethodSignatureBase extends BaseNode {

interface TSPropertySignatureBase extends BaseNode {
type: AST_NODE_TYPES.TSPropertySignature;
key: PropertyNameComputed | PropertyNameNonComputed;
key: PropertyName;
optional?: boolean;
computed: boolean;
typeAnnotation?: TSTypeAnnotation;
Expand Down