Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Incosistent AST for typeArgument and typeParameters #220

Copy link
Copy link
Closed
@armano2

Description

@armano2
Issue body actions

While doing #219 i notice that we have small inconsistency in AST, sometimes we are outputting TSTypeParameterDeclaration and TSTypeParameterInstantiation without nodes and sometimes we are omitting this node completely.

if (superClass.types[0] && superClass.types[0].typeArguments) {
result.superTypeParameters = this.convertTypeArgumentsToTypeParameters(
superClass.types[0].typeArguments
);
}

if (node.typeArguments && node.typeArguments.length) {
result.typeParameters = this.convertTypeArgumentsToTypeParameters(
node.typeArguments
);
}

if (node.typeParameters && node.typeParameters.length) {
result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration(
node.typeParameters
);
}

if (node.typeParameters) {
result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration(
node.typeParameters
);
}

we should align it, but i'm unsure if we should always have it or not

additionally we should handle #146 in update for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: typescript-estreeIssues related to @typescript-eslint/typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.