Skip to content

TS6133: 'T' is declared but its value is never read #21931

Closed

Description

@yortus

TypeScript Version: 2.8.0-dev.20180213

Search Terms:

  • TS6133

Code

interface A<T> { T: T } // ERROR
//         ^^^ TS6133: 'T' is declared but its value is never read.

type B<T> = { T: T };   // OK

Expected behavior:
No errors.

Actual behavior:
TSC thinks the generic type T is unused in interface A, but it is used. Meanwhile the equivalent type B gets it right.

Activity

  1. ghost closed this as completedon Feb 14, 2018
  2. ghost added
    Fixed
    on Feb 14, 2018
  3. yortus commented on Feb 15, 2018

    @yortus
    ContributorAuthor

    Andy (Andrewkraft) (@Andy-MS) I'm definitely repro'ing this in typescript@next. Can you take another look please?

    ts6133

  4. ghost reopened this on Feb 15, 2018
  5. ghost removed
    Fixed
    on Feb 15, 2018
  6. ghost added
    Fixed
    on Feb 15, 2018
  7. ghost closed this as completedin #21966on Feb 15, 2018
  8. locked and limited conversation to collaborators on Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFixed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions