Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Generic checking error #18387

Copy link
Copy link
@tinganho

Description

@tinganho
Issue body actions

I think #16368 broke this code for me:

class Model {}

class Collection<M extends Model> {
    m: M;
}

class User extends Model {
}

class Users extends Collection<User> {
}

type CollectionClass = typeof Collection;
let a: CollectionClass = Users; // Error 'User' is not assignable to 'M' 

If I provide the --noStrictGenericChecks flag, it compiles without any complaints. Can I correct this without using the flag?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarified

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.