-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Self based types for model #1999
Self based types for model #1999
Conversation
|
type AnyFunction = (...args: any[]) => any; | ||
|
||
type Cast<A1 extends any, A2 extends any> = A1 extends A2 ? A1 : A2; | ||
type Compute<A extends any> = { [K in keyof A]: A[K] } & unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the equivalent of your Expand
. I've just been using this on TS playground when I've been experimenting and later copied it from here - can revert back to your Expand
if you like that version better.
No description provided.