Skip to content

allow type bound function references and classes and values #30567

@zpdDG4gta8XKpMCd

Description

@zpdDG4gta8XKpMCd

quite often i run into a situation were i need a reference to a generic function to be pre-filled with some type arguments, example:

declare function toArrayOf<T>(): T[];
declare function fn<T>(make: () => T): void;

// currently it takes
fn(() => [] as string[]);

// i wish, i could do
fn(toArrayOf<string>); // <-- a reference to a generic function pre-filled with type arguments

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