You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This chapter talks about:
Using an intersection type to slove combine properties into index signature,but this is not useful.
I have a question, Why not use Union Types(|) to combine this properties?
And, Why TS is not infer "never" type, when you use intersection type(&) to merge two types that cannot possibly intersect.
type FieldState = {
value: string
}
type FormState =
{ isValid: boolean }
& { [fieldName: string]: FieldState }
The text was updated successfully, but these errors were encountered:
This chapter talks about:
Using an intersection type to slove combine properties into index signature,but this is not useful.
I have a question, Why not use Union Types(|) to combine this properties?
And, Why TS is not infer "never" type, when you use intersection type(&) to merge two types that cannot possibly intersect.
The text was updated successfully, but these errors were encountered: