hkt-toolbelt icon indicating copy to clipboard operation
hkt-toolbelt copied to clipboard

Research delayed-extension type parameters

Open poteat opened this issue 1 year ago • 2 comments

There is a theory that explicit type Foo<T extends string> = T syntax as opposed to type Foo<T> = T extends string ? T : never syntax causes TS eager evaluation to happen - it could be that migrating to the latter form could improve inference performance / allow more "magically cyclic" structures.

poteat avatar Aug 05 '23 01:08 poteat