8000 Generic constraint with type list · Issue #2099 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Generic constraint with type list #2099
Closed
@NN---

Description

@NN---

It is a generalization of #2049 .
I would like to see generic specifying concrete types:

// Can specify only A<number> or A<string>
interface A<T is number|string|Object> { }  

interface B<T is number|string> extends A<T> {} // number|string is subtype of number|string|Object .

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0