Skip to content

[array-type] autofix is broken #172

Closed
@mysticatea

Description

@mysticatea

Repro

{
  "rules": {
    "@typescript-eslint/array-type": "error"
  }
}
type Unwrap<T> =
    T extends Array<infer E> ? E :
    T extends ReadonlyArray<infer E> ? E :
    /* otherwise */ T

Expected Result

type Unwrap<T> =
    T extends (infer E)[] ? E :
    T extends ReadonlyArray<infer E> ? E :
    /* otherwise */ T

Actual Result

type Unwrap<T> =
    T extends infer E[] ? E :
    T extends ReadonlyArray<infer E> ? E :
    /* otherwise */ T

Additional Info

Nothing in particular.

Versions

package version
@typescript-eslint/eslint-plugin 1.1.1
@typescript-eslint/parser 1.1.1
TypeScript 3.2.2
ESLint 5.12.1
node 11.9.0
npm 6.6.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpackage: 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