GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Instantiation expressions by ahejlsberg · Pull Request #47607 · microsoft/TypeScript

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Jan 26, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

With this PR we implement Instantiation Expressions which provide the ability to specify type arguments for generic functions or generic constructors without actually calling them. For example:

function makeBox<T>(value: T) {
    return { value };
};

const makeStringBox = makeBox<string>;  // (value: string) => { value: string }
const stringBox = makeStringBox('abc');  // { value: string }

const ErrorMap = Map<string, Error>;  // new () => Map<string, Error>
const errorMap = new ErrorMap();  // Map<string, Error>

Above, the instantiation expression makeBox<string> changes the type of makeBox from <T>(value: T) => { value: T } to the more specific type (value: string) => { value: string }. When emitted to JavaScript, instantiation expressions simply have the type arguments erased.

Instantiation expressions are particularly useful for creating specific instantiations of generic class constructors such as the ErrorMap above. Previously, this could only be accomplished with a type annotation or a redundant subclass:

const makeStringBox: (value: string) => { value: string } = makeBox;
class ErrorMap extends Map<string, Error> {}

The argument to the typeof type operator can now be an instantiation expression. For example:

type StringBoxMaker = typeof makeBox<string>;  // (value: string) => { value: string }
type ErrorMapConstructor = typeof Map<string, Error>;  // new () => Map<string, Error>

A particularly useful pattern is to create generic type aliases for applications of typeof that reference type parameters in type instantiation expressions:

type BoxFunc<T> = typeof makeBox<T>;  // (value: T) => { value: T }
type Box<T> = ReturnType<typeof makeBox<T>>;  // { value: T }
type StringBox = Box<string>;  // { value: string }

Notice how Box<T> captures the inferred return type of a generic function without loosing the generic type. This was previously not possible.

The type of an instantiation expression f<T> is determined as follows:

  • If f is an object type, f<T> produces an object type in wherein generic signatures for which <T> is an applicable type argument list are instantiated with the given type arguments. Non-applicable signatures, including non-generic signatures, are elided, but other object type members (such as properties) are unaffected. An error occurs if f has signatures, but none for which <T> is an applicable type argument list.
  • If f is a union or intersection type, f<T> produces a union or intersection type where the type argument list <T> has been applied to each constituent.
  • If f is a generic type, f<T> applies the type argument list <T> to the constraint of the type of f.
  • If f is of any other type, f<T> has the same type as f.

Note that an instantiation expression can be applied to any type, but that an error occurs if no call or construct signatures are present in the type. For example, an instantiation expression can be applied to a union that includes undefined:

function f(makeBox: (<T>(value: T) => T) | undefined) {
    const makeStringBox = makeBox<string>;  // ((value: string) => string) | undefined
    if (makeStringBox) {
        const box = makeStringBox('abc');
    }
}

Fixes #37181.
Fixes #40542.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Jack-Works, xiaoxiangmoe, zheeeng, Harpush, alexrock, tonivj5, jasonkuhrt, antonk52, jcalz, IllusionMH, and 205 more reacted with thumbs up emoji jbmusso, tonivj5, treybrisbane, vargasd, Jack-Works, jcalz, IllusionMH, jeremybparagon, loucyx, Xunnamius, and 77 more reacted with hooray emoji tonivj5, r-cyr, Kingwl, Lucifier129, xiaoxiangmoe, Jack-Works, almeidx, AhmadKabakibi, jasonkuhrt, treybrisbane, and 116 more reacted with heart emoji olivermrose, Kingwl, xiaoxiangmoe, Jack-Works, AhmadKabakibi, tonivj5, jhnns, loucyx, Xunnamius, CarsonMcKinstry, and 47 more reacted with rocket emoji brainkim, VitorLuizC, cypherfunc, alexburner, equt, worstpractice, yss14, kuanyui, LunaTK, and klesun reacted with eyes emoji
All reactions
  • 👍 215 reactions
  • 🎉 87 reactions
  • ❤️ 126 reactions
  • 🚀 57 reactions
  • 👀 10 reactions
Anders Hejlsberg (ahejlsberg) added 7 commits January 21, 2022 14:19
@ahejlsberg
Permit type arguments in references to generic functions
37c466b
@ahejlsberg
Accept new baselines
4851407
@ahejlsberg
Delete pointless fourslash test
0baf656
@ahejlsberg
Fix lint issue
61a2de0
@ahejlsberg
Finalize implementation
d50197c
@ahejlsberg
Add tests
1411a2e
@ahejlsberg
Accept new baselines
fa0d155
@typescript-bot TypeScript Bot (typescript-bot) assigned Anders Hejlsberg (ahejlsberg) Jan 26, 2022
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 26, 2022
@Harpush

Harpush commented Jan 26, 2022

Copy link
Copy Markdown

Anders Hejlsberg (@ahejlsberg) This is super close to a solution of #37181. Will it will allow us to do:

function makeBox<T>(value: T) {
    return { value };
};

// Can we do it or something similar? Currently doesn't compile :(
type MakeBox<T> = ReturnType<typeof makeBox<T>>

// As it now allows us to do (no generics though)
const stringMakeBox = makeBox<string>;
type MakeBox = ReturnType<typeof stringMakeBox>

// And even more relevant to support generics if we can now do:
type MakeBox = ReturnType<typeof makeBox<string>>

Up to now makeBox<string> was illegal without calling it. But now that it is supported allowing typeof on it seems to fit nicely.

Josh-Cena, tstelzer, xiaoxiangmoe, Beraliv, poseidonCore, ethanresnick, stefnotch, benallfree, RobinTail, worstpractice, and 6 more reacted with thumbs up emoji sledorze, tonivj5, worstpractice, and jmopel reacted with eyes emoji
All reactions
  • 👍 16 reactions
  • 👀 4 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@g-plane

Pig Fang (g-plane) commented Jan 26, 2022

Copy link
Copy Markdown
Contributor

Building the TypeScript playground for this PR would be better.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Anders Hejlsberg (ahejlsberg) added 2 commits January 26, 2022 17:16
@ahejlsberg
Properly handle instantiation of instantiation expression types
aaf4d12
@ahejlsberg
Accept new API baselines
e7ebe5c
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Jan 27, 2022

Copy link
Copy Markdown
Member Author

This is super close to a solution of #37181. Will it will allow us to do...

Yes, you can indeed use that pattern to capture a generic return type of a generic function. This is something that previously wasn't possible. I'll update the PR description to include an example.

Harpush, jhnns, electron-space, sinclairzx81, angusryer, stefnotch, matijagrcic, worstpractice, yss14, athasach, and 4 more reacted with rocket emoji
All reactions
  • 🚀 14 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Fix lint error
483e8df
@ahejlsberg
Anders Hejlsberg (ahejlsberg) requested review from Daniel Rosenwasser (DanielRosenwasser), Ryan Cavanaugh (RyanCavanaugh), Andrew Branch (andrewbranch) and Wesley Wigham (weswigham) January 27, 2022 05:49
@ahejlsberg Anders Hejlsberg (ahejlsberg) mentioned this pull request Jan 27, 2022
Allow binding generic functions to a given type #37181
Closed
5 tasks done
@Jack-Works

Jack Works (Jack-Works) commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Let's say we have a function f have a call signature f<T extends number, Q>() and a construct signature new f<T extends string>()

What will this PR behave? They have different argument counts and even different different type constraints

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jan 27, 2022
type infer from generic function #32170
Closed
Ability to parametrize generic function type #44521
Open
Ability to get generic type from typeof and infer #33185
Open
Apply function generics as part of type definition #40542
Closed
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Jan 27, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Let's say we have a function f have a call signature f<T extends number, Q>() and a construct signature...

This works just fine:

declare const f: {
    <T extends number, Q>(): [T, Q];
    new <T extends string>(): [T];
};

type T0 = typeof f<string>;  // new () = [string]
type T1 = typeof f<number, string>;  // () => [number, string]

But an error occurs here:

declare const g: {
    <T extends number>(): [T];
    new <T extends string>(): [T];
};

type T2 = typeof g<string>;  // Error, type 'string' does not satisfy the constraint 'number'
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Add more tests
8e466ba
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Jan 27, 2022

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test this
TypeScript Bot (@typescript-bot) user test this inline
TypeScript Bot (@typescript-bot) run dt
TypeScript Bot (@typescript-bot) perf test this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Heya Anders Hejlsberg (@ahejlsberg), I'm starting to run the inline community code test suite on this PR at 8e466ba. Hold tight - I'll update this comment with the log link once the build has been queued.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MartinJohns Martin Johns (MartinJohns) mentioned this pull request Jun 15, 2022
Unexpected syntax errors of a < (b >= c ...) in TS 4.7 #49551
Closed
@tonyxiao

Tony Xiao (tonyxiao) commented Jul 21, 2022

Copy link
Copy Markdown

Did this feature get released in 4.7? Somehow when I try the example with ts version 4.7.4 (latest as of today) it complains in the editor.

CleanShot 2022-07-21 at 09 40 21@2x

tomholford, stagas, 1calorie, jordaaash, and JodyAndrews reacted with thumbs up emoji
All reactions
  • 👍 5 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@orta

Orta Therox (orta) commented Jul 21, 2022

Copy link
Copy Markdown
Contributor

Yep, works in the playground - given that those inline error messages dont come from the official typescript extension (to my knowledge)- it's likely a local setup issue causing this

image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZachHaber Zachary Haber (ZachHaber) mentioned this pull request Aug 3, 2022
Instantiation expressions inconsistently trigger incorrect error messages in editor contexts #50161
Closed
@noinkling Malcolm (noinkling) mentioned this pull request Aug 25, 2022
Allow to explicitly pass type parameters via JSDoc #27387
Open
4 tasks done
@btoo btoo mentioned this pull request Aug 30, 2022
Implement partial type argument inference using the _ sigil #26349
Closed
This was referenced Sep 1, 2022
📎 Tracking tasks for implementing Instantiation expressions rome/tools#3147
Closed
feat(rome_js_parser): instantiation expressions rome/tools#3152
Merged
@DrSensor

૮༼⚆︿⚆༽つ (DrSensor) commented Oct 16, 2022

Copy link
Copy Markdown

It doesn't works on build-ins method 🤔
https://www.typescriptlang.org/play?jsx=0#code/FAYw9gdgzgLgBCAhiAFgUzgXjhNB3OAdTUQGsBZRABwB5g44BBAGnrgCU0YBXAJwgAqATypoaMEWjAAzOAHkARgCs0IGAG0ARAHMucvBAAKvMKN4SAImigheASyowwvKJoC6NRgD4vcAPR+cGi8JrzAXgAUAJQA3MCgkLBwiFhwAN5wCgBccACMcAC+wBKiTKklUrKI8eDQ8AAm1iCUVKmKKmoAdLow+kYmZpZN9o7OUJ6RiFFAA

const cache = new WeakMap<
  A,
  ReturnType<typeof Object["getOwnPropertyDescriptors"]<A>> // error
>();

const a = { b: 1 }
type A = typeof a

const descMap = Object.getOwnPropertyDescriptors<A>(a)
    'A' only refers to a type, but is being used as a value here.
    Variable 'ReturnType' implicitly has an 'any' type.
    Conversion of type '{ b: number; }' to type '<T>(o: T) => { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & { [x: string]: PropertyDescriptor; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
      Type '{ b: number; }' provides no match for the signature '<T>(o: T): { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & { [x: string]: PropertyDescriptor; }'.
    ',' expected.
    '>' expected.
    Expression expected.
    Expression expected.
    Expression expected.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Andarist

Mateusz Burzyński (Andarist) commented Oct 16, 2022

Copy link
Copy Markdown
Contributor

You cant use brackets, just qualified names:

https://www.typescriptlang.org/play?jsx=0#code/FAYw9gdgzgLgBCAhiAFgUzgXjhNB3OAdTUQGsBZRABwB5g44BBAGnrgCU0YBXAJwgAqATypoaMEWjAAzOAHkARgCs0IGADoA5lzl4IABV5hRvCQBE0UELwCWVGGF5QajAHyu4wVwAoAlAG5gUEhYOEQsOABvOAUALjgARjgAX2AJUSYI9KlZRCDwaHgAE0sQSioIxRU1LR09Q2M0UyELK1t7R2c3b0RfIA

DrSensor reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@herjiict

herjiict commented Nov 30, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

How to use this feature with overloaded functions ?

declare function foo<T extends keyof HTMLElementTagNameMap>(arg: T): HTMLElementTagNameMap[T];
declare function foo<T extends HTMLElement>(arg: T): T;
type FirstFoo = typeof foo<"div">;    // error
const f: ReturnType<FirstFoo> = foo("div");

I couldn't get the code to work. The error message is Type 'string' does not satisfy the constraint 'HTMLElement'.
Why does it have to satisfy both foos ? How to pick the first foo ?

https://www.typescriptlang.org/play?ts=4.9.3#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVJxwB4AVeEADwxFWAGd4BrEATx0XgAkSBZAGQCiEEAFsaGElADmAOShieUAA4A+ABSwpALngkAlDu78ho8ZNnyQipQG0SAXQDcAKFCRYCFOmx4CxMpTUtAxGgsJiqBjqmjr6sS4YLEoIAGJYMHQYKYTwALzwicnsfkQARMBYAG6lKi5geJlIOgBKIBjIMKgkSSBEaRlZhCp5fmrlVaV6LkA

The code works if I change the second foo to declare function foo<T extends HTMLElement, U>(arg: T, _unused: U): T;.
But I can't get it to work if foo have only one parameter. (Is there still something ambiguous to the compiler in this case that prevent the compiler from picking the first foo ?)

ckellnerRED reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Andarist Mateusz Burzyński (Andarist) mentioned this pull request Nov 30, 2022
Instantiation expressions don't filter signatures with non-matching constraints #51694
Open
@jcalz Joe Calzaretta (jcalz) mentioned this pull request Dec 7, 2022
Question marks (JSDoc types) allowable in instantiation expression type arguments #51802
Closed
@MOZGIII MOZGIII (MOZGIII) mentioned this pull request Dec 18, 2022
No high order generics binding #51947
Closed
@Thundercraft5

Thundercraft5 commented Jan 17, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Higher-order instantiation expressions don't resolve properly, as they weren't accounted for in the test baselines (see also issue #52035).

declare function transform<
    const A extends readonly any[], 
    F extends <
        V extends A[number], 
        K extends keyof A,
    >(value: V, index: K, array: A) => any
>(array: [...A], func: F): { [K in keyof A]: ReturnType<typeof func<A[K], K>> };

const $2 = transform(["object", "string", "number"], k => ({ type: k }));
    // ^?
    // Should be [{ type: "object" }, { type: "string" }, { type: "number" }], but is [any, any, any]

https://www.typescriptlang.org/play?target=99&jsx=0&ts=5.0.0-dev.20221220#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwxilQGdEcYBbAHgCh4H4w8SN4BBeEADwxFWAl4cKMDwQAnvGISA2gF0ANPHqMAYl179B8Oo33wAapr4Ch7WamSUARiBhKVBxgGkT2oQGsQEnIg6KqgwAfAAUAG5QEMggAFxGylgCPPEuyrBEEvHsAJTwALzB0qgStGEZUFnwsgB0deyOKOjxajnxAN7Vbknw3r7+DfEASiAYyDCoACoSAA4g1BizIH5IaGDUFi6OLsFFAL4A3LS0zKRsACQATAUERKTkVKGyAEQ4NgBW4BjPys+sMEkAOY-eDPKy2ezPRyeApFUKdRZzeIwvY5HJHfQAekx8AAegB+ILwbHwADKAAscMgIMB4HZqgilvFXh8vs94HtlIykaD-kD2Zz4Ny4qDwXYYAL5EA

ntucker reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Thundercraft5 Thundercraft5 mentioned this pull request Jan 19, 2023
Higher Order Instantiation Expressions don't resolve types correctly #52035
Closed
@ryanrhee Ryan Rhee (ryanrhee) mentioned this pull request Jan 31, 2023
Generic parameters, e.g. in typeof foo<T1, T2> not recognized for typeof types microsoft/TypeScript-TmLanguage#957
Closed
@JasonKleban JasonKleban mentioned this pull request Mar 14, 2023
Instantiation Expressions from generic class static member #53247
Closed
@jedwards1211

Andy Edwards (jedwards1211) commented May 16, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Correct, instantiation expressions currently have no equivalent in type land.

Is there any issue tracking a design for a way we could do that?

I've been trying to do something that I'd be able to accomplish if I could have a type like

// type ApplyFn<Fn, Arg> = (some magic...)
type Applied = ApplyFn<<T>(value: T) => { value: T }, 1 | 2 | 3> // { value: 1 | 2 | 3 }

Someone correct me if I'm wrong but it seems there's no way to do this for an arbitrary function.

moneydance and hsl0 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcalz Joe Calzaretta (jcalz) mentioned this pull request Jul 30, 2023
Incorrect type inference for generic types with 'prototype' property #55199
Closed
@iFwu

niceSprite (iFwu) commented Aug 4, 2023

Copy link
Copy Markdown

It also solves #20719.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@darrylnoakes

Darryl Noakes (darrylnoakes) commented Aug 4, 2023

Copy link
Copy Markdown

Correct, instantiation expressions currently have no equivalent in type land.

Is there any issue tracking a design for a way we could do that?

I've been trying to do something that I'd be able to accomplish if I could have a type like

// type ApplyFn<Fn, Arg> = (some magic...)
type Applied = ApplyFn<<T>(value: T) => { value: T }, 1 | 2 | 3> // { value: 1 | 2 | 3 }

Someone correct me if I'm wrong but it seems there's no way to do this for an arbitrary function.

I don't believe there is. Instantiation expressions only work for values; you can't use a similar method in types.
I tried to work around the lack of higher-order generics by using a generic function type, but I think the core limitations are the same, so it's not supported. The function-type type parameter is said to be not generic.

type Fn = <Arg>() => unknown
type ApplyFn<T, F extends Fn> = T extends unknown ? ReturnType<F<T>> : never

const f = <T>(): [T] => ({} as [T])

type t1 = ApplyFn<1 | 2, typeof f>

The following (direct instead of the type parameter) works:

type ApplyFn<T> = T extends unknown ? ReturnType<typeof f<T>> : never

type t1 = ApplyFn<1 | 2>
//   ^? [1] | [2]
pedrotorchio-frankieone and blackparadise0407 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@craigphicks Craig P Hicks (craigphicks) mentioned this pull request Dec 12, 2023
Ability to pass a generic function as a parameter to a generic function - (perhaps the best way to implement "oneof") #56746
Closed
6 tasks done
@jcalz Joe Calzaretta (jcalz) mentioned this pull request Jan 20, 2024
Assume type X = <T>() => Z<T>; as having an optionnal generic type parameter to enable deducing the return type on generic methods #57102
Closed
6 tasks done
@denis-migdal Denis Migdal (denis-migdal) mentioned this pull request Feb 5, 2024
Prefix <T> to access methods with generics : Klass[<T>"method"] #57297
Closed
6 tasks done
@Janpot Jan Potoms (Janpot) mentioned this pull request Mar 27, 2024
[data grid] 7.0 migration script exception mui/mui-x#12567
Closed
@jcalz Joe Calzaretta (jcalz) mentioned this pull request Feb 6, 2025
Feature Request: Instantiate Generic Functions within Conditional Types #61133
Open
6 tasks done
@Ersaoktaviannn Ersa Oktavian Ramadan (Ersaoktaviannn) mentioned this pull request Sep 2, 2025
Method overloads fail to resolve correctly when using mapped types with conditional generics and optional parameters #62377
Open
@mhofman Mathieu Hofman (mhofman) mentioned this pull request Oct 2, 2025
Type instantiation for type level generic function #62524
Open
6 tasks done
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@weswigham Wesley Wigham (weswigham) weswigham left review comments
@jakebailey Jake Bailey (jakebailey) jakebailey left review comments
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Awaiting requested review from DanielRosenwasser
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) Awaiting requested review from RyanCavanaugh
@andrewbranch Andrew Branch (andrewbranch) Awaiting requested review from andrewbranch
+1 more reviewer
@treybrisbane Trey Brisbane (treybrisbane) treybrisbane left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ahejlsberg Anders Hejlsberg (ahejlsberg)

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

PR Backlog
Archived in project

Milestone

TypeScript 4.7.0

Development

Successfully merging this pull request may close these issues.

Apply function generics as part of type definition Allow binding generic functions to a given type

Uh oh!

There was an error while loading. Please reload this page.

20 participants

@ahejlsberg @Harpush @g-plane @Jack-Works @typescript-bot @sandersn @paavohuhtala @xiaoxiangmoe @orta @buschtoens @Andarist @devanshj @millsp @n1ru4l @phi0411141 @DanielRosenwasser @zedryas @jcalz @tonyxiao @DrSensor
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.