Skip to content

type alias does not work with classes #5014

Closed
@ghost

Description

I defined a class:

    export class TCommand<TSender, TParam, TThis> 
    {
    }

and created an alias for the closed type:

 export type Command = TCommand<any, any, any>;

now when i try:

 export class NextCommand extends Command {
 }

the compiler says: Error 1 Cannot find name 'Command'

but i can write

  var cmd: Command = null;

without errors,

Expected: to allow using this type alias for inheritance purposes.

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