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

[array-type] Incorrect fix when using an Array of arrow functions with rest parameters #4756

Closed
Labels
bugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@cheit-epic

Description

@cheit-epic
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I haveread the FAQ and my problem is not listed.

Repro

{"rules": {"@typescript-eslint/array-type":"error"  }}
constfoo:Array<new(...args:any[])=>void>=[];

Expected Result

constfoo:(new(...args:any[])=>void)[]=[];

Actual Result

constfoo:new(...args:any[])=>void[]=[];

The lack of parentheses changes the type to be "a function that returns void[]" rather than "an array of functions that return void"

Versions

packageversion
@typescript-eslint/eslint-plugin5.17.0
@typescript-eslint/parser5.17.0
TypeScript4.4.4
ESLint8.8.0
node8.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp