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

Research delayed-extension type parameters #43

Open
poteat opened this issue Aug 5, 2023 · 2 comments
Open

Research delayed-extension type parameters #43

poteat opened this issue Aug 5, 2023 · 2 comments
Labels

Comments

@poteat
Copy link
Owner

poteat commented Aug 5, 2023

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.

@MajorLift
Copy link
Collaborator

That's super interesting, and great that there's an option for controlling lazy evaluation.

@michaelKurowski
Copy link

@poteat This is very interesting, could you provide some examples or source where did you read about it so that it would be possible to read up on the topic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants