Way to turn properties into X | null? #182
Unanswered
xaviergonz
asked this question in
Wiki
Replies: 3 comments
-
Yes, you can use Update |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is this supposed to work then? It doesn't for me interface A {y: number}
type C = O.Update<A, "y", A.x | null>
const c: C = {y: 4} // complains about 'y' being a number |
Beta Was this translation helpful? Give feedback.
0 replies
-
Nevermind, didn't work on 4.1.0 but works on 4.3.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there something like
O.Nullable
but that actually makes keys turn intoV | null
?e.g.
Beta Was this translation helpful? Give feedback.
All reactions