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

[no-unnecessary-type-arguments] fails for CustomEvent #1224

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@andreineculau

Description

@andreineculau

Repro

{"rules": {"@typescript-eslint/no-unnecessary-type-arguments": ["error"]  }}
classFooEventextendsCustomEvent<any>{}

Expected Result

to pass linting.

Actual Result

Fails linting, because the typeCustomEvent<T> has a default typeany for the genericT, and thus it wants justCustomEvent.

The problem is thatCustomEvent is defined as a global variable, thus the meaning ofextends CustomEvent is different thanextends CustomEvent<any>.

Additional Info

Versions

packageversion
@typescript-eslint/eslint-plugin2.7.0
@typescript-eslint/parser2.7.0
TypeScript3.7.2
ESLint6.6.0
node12.12.0
npm6.11.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: 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