A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/typescript-eslint/typescript-eslint/issues/146 below:

Some properties named typeParameters instead of typeArguments · Issue #146 · typescript-eslint/typescript-eslint · GitHub

I've noticed several parts of the code referring to type arguments as type parameters. What's the reason for using typeParameters 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 ast
someFunction(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 as typeArguments when I'm looking at https://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 it node.typeArguments.params though...).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4