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

Prettify utility #581

Closed
kof opened this issue Mar 27, 2023 · 2 comments
Closed

Prettify utility #581

kof opened this issue Mar 27, 2023 · 2 comments

Comments

@kof
Copy link

kof commented Mar 27, 2023

This thread by @mattpocock https://twitter.com/mattpocockuk/status/1622730173446557697 explains the details

type Prettify<T> = { [k in keyof T]: T[k] } & {}

TLDR is complex intersection types are unreadable in autocomplete and this makes it readable, seems like something that should be in ts itself, but lets get it become more popular first, people are unaware

@istarkov
Copy link

@kof
Copy link
Author

kof commented Mar 27, 2023

ohhh nice!

@kof kof closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants