Skip to content

Infer lacked types of methods from bases #20422

Closed
@falsandtru

Description

@falsandtru

TypeScript Version: master

Code

abstract class C {
  abstract m(a: number): void;
}

class D extends C {
  m(a) { // a should be number type
  }
}

Expected behavior:

Actual behavior:

$ node built/local/tsc.js index.ts --noImplicitAny --strictNullChecks
index.ts(6,5): error TS7006: Parameter 'a' implicitly has an 'any' type.

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