Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

TSLint complains about > { with generics and one-line. #3084

Closed
@fongandrew

Description

Bug Report

  • TSLint version: 5.4.3
  • TypeScript version: 2.4.1
  • Running TSLint via: (pick one) VSCode

TypeScript code being linted

// code snippet
export interface MyInterface<
  R extends string,
  D extends string,
  O extends string
> {
   /* ... */
}

with tslint.json configuration:

{
  "rules": {
    "one-line": [true,
      "check-open-brace"
    ]
  }
}

Actual behavior

TSLint complains about misplaced opening brace (one-line) on the > { line

Expected behavior

No complaint. This is essentially the same as the > ( in the following code, which doesn't trigger a TSLint error.

function test<
  R extends string,
  D extends string,
  O extends string
> (
  required: R,
  default: D,
  optional: O
) {
  /* ... */
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions