Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Some properties named typeParameters instead of typeArguments #146

Closed
Labels
ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreequestionQuestions! (i.e. not a bug / enhancment / documentation)
Milestone
@dsherret

Description

@dsherret

I've noticed several parts of the code referring to type arguments as type parameters. What's the reason for usingtypeParameters here? Seems like there might be some temporary stuff going on? Will this be renamed in the future?

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

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

Some example code:playground

someFunction<string>();// this type argument is incorrectly referred to as a type parameter in the astsomeFunction(1);// this argument is correctly referred to as an argument in the ast

Anyway, I just wanted to start a discussion about it so at least it's in the issue tracker. Also, FWIW, babel-eslint9 correctly refers to them astypeArguments when I'm looking athttps://astexplorer.net, but I'm not so familiar with the babel or eslint ecosystem so I'm not sure how they're related (Edit: Looks like they call itnode.typeArguments.params though...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreequestionQuestions! (i.e. not a bug / enhancment / documentation)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp