镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Class type parameter is not flowed to class property #15136

Description

@bcherny
class Class<T> {
  a: (b: T) => string
}

class Class2 extends Class<number> {
  a = b => 'b' // ERROR: Parameter 'b' implicitly has an 'any' type.
}

Expected: b should be a number
Actual: b is any

This is likely tracked already, but I was not able to find it. Filing here just in case.

Activity

  1. RyanCavanaugh commented on Apr 11, 2017

    @RyanCavanaugh
    Member
  2. locked and limited conversation to collaborators on Jun 21, 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

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions