Skip to content

Add resolving class via parameter types of constructor #2485

Open
@MaxGraey

Description

@MaxGraey

Example

class Foo<T> {
  constructor(public boo: T) {}
}
new Foo("abc");  // ERROR TS2558: Expected 1 type arguments, but got 0.
new Foo(123);    // ERROR TS2558: Expected 1 type arguments, but got 0.

Expected behavior: compile without errors

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions