Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow type bound function references and classes and values #30567

Closed
zpdDG4gta8XKpMCd opened this issue Mar 24, 2019 · 1 comment
Closed

allow type bound function references and classes and values #30567

zpdDG4gta8XKpMCd opened this issue Mar 24, 2019 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@zpdDG4gta8XKpMCd
Copy link

zpdDG4gta8XKpMCd commented Mar 24, 2019

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
@zpdDG4gta8XKpMCd zpdDG4gta8XKpMCd changed the title allow type bound function references allow type bound function references and classes and values Mar 24, 2019
@jack-williams
Copy link
Collaborator

Duplicate of #29043?

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants