Skip to content

Generic Type Alias #2017

Closed
Closed
@mudHOAX

Description

@mudHOAX

I'd love to have the ability to be able to create generic type aliases.

At the moment we are using interfaces to reference our common function signatures.

interface IGenericCallback<T> {
    <T>(val: T, index: number, arr: Array<T>): void;
}

I'd love to be able to remove these interfaces and use something along the lines of:

type GenericCallback<T> = <T>(val: T, index: number: arr: Array<T>): void;

Is this something that may be considered as a feature enhancement?

Regards,
Ian Munro

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